How to get multiple rows from a file?
Gents, I have a big file, where I would like to get some rows.. Then file1 contains. Code: Obs_Report_Result : [...
View ArticleGFORTRAN sending .o files in separate directory
I am using gfortran and want to send .o files in separate directory. Currently I have the following in a bash script. The .mod files are handled ok, but the .o files are still created in the same...
View ArticleHow to select First two directory in from path name?
Can somebody help me on below question I have path and i want to select first two directory name in variable how we can do this. /Myname/xyz/yourname/abc/somebodyname i want to select /Myname/xyz in...
View ArticleShell Scripting for Router, Switch & FW deviation
Hi, I have written a script for finding deviation for router,switch &fw. It is working fine on linux server. But when I try on sunos 5.10 OS it showing "grep: illegal option -- A". I have used grep...
View ArticleScript to count number of files in directories
Hi All! I would like to have a script that will count the number of files at the top of the hour of soome directories and mail the results to me. I was thinking on : Code: a=`/directory/subdirectory/ |...
View Articlefind -ctime
Code: startdate="2012_07_04-16:14:4" path1="/home/drdos/sample" days=0 find $path1 -name "*$startdate*" > teste.txt while [ ${cat teste.txt | grep -c $startdate } -lt 0] do find $path1 -name...
View Articlerm -rf ab returns find: `./ab': No such file or directory
Hi Gurus. This is driving me a bit batty. I now if must be a simple matter but I cant find anything that references it. I have a housekeeping script that searches for some huge dump directories then...
View Articlessh code issues
Hi guys. I intend to develop a script to perform certain activities on several servers at the same time. Currently I am working with 2 servers only. I want to ssh for M1 over to M2 and run some...
View ArticlePerl script limit cpu usage
Hi Experts, I am executing multiple instances(in parallel) of perl script on HP-UX box. OS is allocating substantial amount of CPU to these perl processes,resulting higher cpu utilization. Glance...
View ArticleWrong data with Read from a serial port.
hi, I've a problem on my C/C++ program with Posix Library. I have to read data from the serial but I have incorrect data, in fact I get a bunch of zeros: "2953.3174, 2785.2126, 0.0, 0.0, 0.0, 0.0, 0.0,...
View ArticleRemoving white space in awk
Hi How to remove white space from this input: Code: |blue | 1| |green| 4| |black| 2| I like to search for green and get Code: 4 not Code: 4 How to modify this to work correct: Code: awk -F"|"...
View ArticleReading string and adding the values in the final logfile
Dear all, I have small script which seems to be working but seems to have some bug. It suppose to read commonTxt and then print the noOfLines in outputFile. It is working for most of the txt but unable...
View ArticleSum up the column values group by using some field
Code: 12-11-2012,PNL,158406 12-11-2012,RISK,4564 12-11-2012,VAR_1D,310101 12-11-2012,VAR_10D,310101 12-11-2012,CB,866 12-11-2012,STR_VAR_1D,298494 12-11-2012,STR_VAR_10D,309623 09-11-2012,PNL,1024106...
View ArticleScript To Generate HTML output
Hello All, I need help here with a script. I have a script here which generates a html output with set of commands and is working fine. Now i want to add a new command/function which would run on all...
View ArticleHelp mathematical shell programming
Hello Guys,For my homework I must write a shell script to do this serie, I know that I must use the "bc" for that, but for the script's itself i have no idea,(beginner) Can you plz just help me for...
View ArticleWildcards used in find, ls and grep commands
Platforms : Solaris 10 and RHEL 5.6 I always get double quotes , single quotes and asteriks mixed up for find, ls and grep commands. The below commands retrieve the correct results. But , unders stress...
View ArticleGrep multiple words with not null value
Hi, I want to grep a file if any one (GH, IJ, KL) is not null. If it is null i dont want to pull anything. Code: cat file | awk '{print ($1)}' Parameters are : AB=123;CD=456;EF=6789; cat file | awk...
View ArticleWhat's wrong with this awk?
I have a file and if I'm doing following action on that file it's coming up correctly Code: awk -F"," '/DATA_TYPE/ { cnt += $3 } END { print " DATA_TYPE count=" cnt}' inter DATA_TYPE count=19593131...
View ArticleHBA data traffic monitor in Solaris 10.
Hi All We have T4-4 Server with 2 HBA configured for SAN connectivity. We want to monitor Data traffice going through these HBA. On other AIX system we have that capability with nmon. Following screen...
View ArticlePasswd question
Hello, I'm trying to set my SuSe severs to have accounts lock after 35 days. I have googled this and all I can find is the -f option for when the account password expires. usermod -f user On other...
View Article