Number of elements, average value, min & max from a list of numbers using awk
Hi all, I have a list of numbers. I need an awk command to find out the numbers of elements (number of numbers, sort to speak), the average value the min and max value. Reading the list only once, with...
View ArticleCron - job to run every 3rd Friday of the month only
Hi Expert Please help me to set a cron job schedule, Ihave a job that run every 3rd Friday of the month at 1030am. I tried to set up like this, but the job still runs every friday at 1030am. I want the...
View ArticleProblem in making a list with awk
Hi bodies,I am doing a list from a .txt file with awk commands but something is wrong. The .txt file looks like: Code: 32782 28 18 32783 02 18 32784 01 18 32785 29 18 32786 25 23 32787...
View ArticleSimple sed script question
Script newbie, so I'm sure I'm missing something obvious here, but how come this simple script does not work? Code: #!/bin/bash...
View Article[solved] Help using head cmd, print 20 then the next 20 etc
Hi all, I have a list of text, single column and I want to print the first 20, then the second 20 and so on. I was pointed to xarg to help with this, but can't get my head around how to use it. Would...
View ArticleHelp with Ubuntu server 12.04 installation
hello, i have been try installing Ubuntu server 12.04 and receiving a message: no network interface card detected. can someone help me to locate where my interface card is
View ArticleHow to change directories?
Hi, I am changing my directory structure /opt/multifamily/restatement/weblogic to /users/saanvi/weblogic Am using sed command to changing the directoried names Please hepme out on this. there is any...
View ArticleWildcards in file input to a script?
I have four files: test test2 test3 test4 I have this simple script: Code: #!/bin/bash ls $1 Why does ./the_script.sh test* only list the first file, when a normal ls test* would list all four? What do...
View ArticleHow to get last record?
Hello all, I have an out put of Code: ls -l as follow : Code: drwxr-xr-x 3 pipeline pipeline 4096 Jun 15 2011 mongodb-linux-x86_64-1.8.2 drwxr-xr-x 3 root root 4096 Feb 27 2012...
View ArticleUsing UNIX Commands with Larger number of Files
Hello Unix Gurus, I am new to Unix so need some help on this. I am using the following commands: 1) mv -f Inputpath/*.[Pp][Dd][Ff] outputpath 2) cp Inputpath/*.[Pp][Dd][Ff] outputpath 3) rm -rf...
View ArticleFind Files with a input in directories
So i have directories that store logs, 1 directorie for each day, with the name like this : 2012_07_01/ 2012_07_02/ and for each directorie we have the logs, inside them lives the logs for that day,...
View ArticleUse sed to add comma to end of first field
Example data Code: Gi1/10 Gi1/12 xl32lytscb07 3/11 to nyc 3/12 41764 ecomm 3/13 hxcsxsa 2/1 3/14 ziim570-rsvd 3/15...
View ArticleAppend column using awk/nawk
Is there any way I can achieve this? Considering test1 : Code: a 1 2 3 4 b 2 3 4 5 c 12 1232 14 1 d 10 13 4 5 e 1 5 6 9 1 And test to be some string : Code: qw twe tew we qw I want something like this...
View ArticleSemaphores sem_wait sem_post problem
hallo! if there are many processes running and I initialize the semaphore like this: my_sem = sem_open(SEM_NAME, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, 10); (the last argument is 10) and then i use...
View Articleawk compare column n replace with in one file
hi Friends need to compare columns in one file where the data looks like below laptop,IBM phone,samsung car,rental user1,laptop user2,laptop user3,phone want to get output as laptop,IBM phone,samsung...
View ArticleDelete file with specific date
let say i have list of file PermissionsDirectoriesGroupSizeDateDirectory or file Code: drwx------2users4096Nov 2 19:51mailv drwxr-s---35www 32768Jan 20 22:39public_htmlt drwx------ 2 users 4096 Nov 2...
View ArticleAutomatic shutdown and startup of Tomcat in Solaris
Dear Experts , I want to stop and Start tomcat at the time of shutdown and startup of our server . I was trying to stop tomcat with following command Code: # su - dm -c...
View ArticleFind and move
Greetings.... Trying to find and move the 30 days old logs #!/bin/bash DATE=`date +%d-%b-%Y` STATUSLOG="$HPATH$DATE-E3Backup.log" HPATH="/ABC/Websphere/" HT=`hostname` BKUPSTR="/ABC/Websphere/$HT/"...
View ArticleTuxOnIce stalls 3 times before resuming
I am having trouble resuming from hibernation using TuxOnIce method. The thing works, but in a very strange manner. Here's how it looks: 1. Computer boots and finds resume image and starts resume. It...
View ArticleHow to extend a mirrored logical volume?
Want to extend the /home filesystem: Code: Filesystem kbytes used avail %used Mounted on /dev/vg00/lvol4 262144 260088 2056 99% /home root@server:./root # vgdisplay vg00 --- Volume groups --- VG Name...
View Article