Quantcast
Channel: UNIX and Linux Forums
Browsing all 16232 articles
Browse latest View live

Move parent folder if contents match a parameter

Hi all, Hoping someone can help. I'm looking to be able to search a particular folder path for folders that contain certain files / formats and then move the parent folder. eg....

View Article


Control Cores/CPUs used in Linux instance on VMware

We have a production setup where we have RHEL instances on VMware. We have 2 RHEL instances on VMware now each having 4 CPUs/cores each. I want to put up another RHEL instance but my query is that can...

View Article


Image may be NSFW.
Clik here to view.

Abnormal producer consumer problem driving me nuts

normally, i hate asking someone to do my homework for me but am getting desperate right now. i have a project about consumer producer problem. the deadline is tonight at 23:55. but i havent gotten it...

View Article

Abnormal producer consumer problem driving me nuts

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: normally, i hate...

View Article

Sourcing as root automatically

Hey everyone! I have my .bash_profile file which is read automatically when I launch Terminal therefore I can run my own functions. BUT. When I do: Code: sudo -s Code: sudo su Code: sudo su - No matter...

View Article


Email Command Error

Hi , i am very new unix i need a script which should check for the size of the file and if it is greater than zero ,than i have copy the contain of the file (the file we have checked the size) as body...

View Article

Select Command - return

Hello everyone, A simple question which may have a suggested solution: I am using, and loving, the select command in a ksh93 script on AIX 6.1 to present users with menus. I have been successful in...

View Article

Image may be NSFW.
Clik here to view.

Replacing last spacebar

I need to use bash to replace the last spacebar character for each line in a file so that e.g.: Code: f d e 3 5 becomes Code: f d e 3/5 Moderator's Comments: Please use code tags when posting data and...

View Article


How to check if date format is correct?

Hi! how do i know if the input is the same as the required date format? the date should be dd/mm/YYYY ex. 2/3/2012 or 15/11/2012 all the following conditions must return an error: *input of string *day...

View Article


Image may be NSFW.
Clik here to view.

Loop

Hi I wrote shell script to do the flowing count from 5 and down but doesn’t work please see my program Code: #Bash x=0 y=10 while  (( x < y )) do (( x = x + 1 )) grep -A $x 5 numbers...

View Article

Multi if or or similar

I'm trying to code a line (ksh) without much success along the lines of :- If [ hostname = red or black or green or yellow or blue ] then .....etc fi I know i could use the case statement but i'm...

View Article

Image may be NSFW.
Clik here to view.

HD-Audio: ALSA settings not persistent across reboots.

Hi: The OS is Slackware 14.0. When, after 14.0 install I first ran alsamixer, I got an error message and it quit. After some googling, I created /etc/modprobe.d/alsa.conf with these lines: Code:...

View Article

Multiple long field separators

How do I use multiple field separators in awk? I know that if I use Code: awk -F"[ab]" , both a and b will be field separators. But what if I need two field separators that both are longer than one...

View Article


Gvim doesn't suggest filenames with :e TAB, puts ^I instead

Hello all, When I type :e in vim and then press TAB, vim suggests filenames in that directory. However, when I do the same in gvim, it instead shows ^I for every TAB press instead of suggesting...

View Article

awk one liner to print to end of line

Given: Code: 1,2,whatever,a,940,sot how can i print from one particular field to the end of line? Code: awk -F"," '{print $2 - endofline}' the delimiter just happens to be a comma "," in this case. in...

View Article


Cannot open shared object: when starting nrpe

Got this error when starting nrpe Starting nagios-nrpe: nagios-nrpe/usr/sbin/nrpe: error while loading shared libraries: libssl.so.0.9.8: Pls advise ---------- Post updated at 04:05 PM ----------...

View Article

Right way to change time for a RHEL server

I had the query of what would be the right approach to change the time on the RHEL server. I have the following ways to do that: 1) Code: # date -s "2 OCT 2006 18:00:00" Or Code: # date --set="2 OCT...

View Article


Not getiing expected output

Hi I have written below script to get the data in table form. Code: #!/bin/sh echo "File Name\tType" for i in *; do echo "$i\t\c" if [ -d $i ]; then echo "directory" elif [ -h $i ]; then echo "symbolic...

View Article

While ...loop

Code: #!/usr/bin/ksh totalInstance=3 c=1 SID=SID SID_1=BOYISH SID_2=EAGALE SID_3=PLUNE while [ c -le $totalInstance ] do     BDUMP_DIR="${SID}_${c}"     echo "$BDUMP_DIR"     c=`expr $c + 1`     echo...

View Article

Image may be NSFW.
Clik here to view.

Help with putty window setting

hi friends, This is not a shell scripting related doubt, but still posting so that you can answer it ;) or redirect to correct place in this website. Many a times i have to open multiple putty sessions...

View Article
Browsing all 16232 articles
Browse latest View live