Hi ,
1. I want to grep two or three lines from a set of files and put the grepped lines into again a set of files.like
file1-greppedfile1
file2-greppedfile2
then again do some format to the grepped files with sed or awk then create another set of files.
How can I do this in loop?
2.I... (4 Replies)
I have a script to GREP for a text expression within certain files, the files being named file.11012008 thru file.11302008. 30 files in all, one for each day of the month.
Instead of entering the following 3 lines of code 30 different times, I'm trying to find a way to loop the process:
... (6 Replies)
I have some logic which uses CAT to concatenate group of files, 'SED'-ing some field values and piping the output to one file :-
cat `echo $infilename|sed '{
s/.filestream./'${file_stream}'/g
s/.field2./'${jobopt2}'/g
s/.sb_odate./'${SB_ODATE}'/g
}'` >$outfilename
... (1 Reply)
hi friends,
The code:
i=1
while
do
filename=`/usr/bin/ls -l| awk '{ print $9}'`
echo $filename>>summary.csv
#Gives the name of the file stored at column 9
count=`wc -l $filename | awk '{print $1}'`
echo $count>>summary.csv
#Gives just the count of lines of file "filename"
i=`expr... (1 Reply)
Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated.
script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made.
OS :Susi linux ver 10.3.
... (4 Replies)
Currently I am outputting users and I want to number them starting with 1...
grep name list.txt | awk -F"=" '{ print $2 }' | while read user; do
echo -e "1\t|$user"
Currently I have:
1 | john
1 | amy
1 | max
I want it to look like
1 | john
2 | amy
3 | max (2 Replies)
Hello,
I currently have a script that outputs to a file that contains the output below. It runs every X minutes. I would like to compare the first run against the second but only output if the minutes column is less than its original or if anything else changes. Thanks for the help.
Original
... (2 Replies)
Hello Friends,
Im working on Ksh (it is not my will :) )
I would like to get rid off the outputs lines which includes "can't open" .. i guess it must be an easy thing but could not find any usefull thing,
ls -l *credit* | xargs grep -i "*data*"
22:set conv(DATA) B16
22:proc... (3 Replies)
I have two files, "ranked.txt" and "sorted.txt". Sorted.txt is a smaller subset from ranked.txt that is sorted in alpha order. However ranked.txt preserves the ranking of words I would like to keep.
How do I check the rank of every word in sorted.txt when matched to the original ranked.txt? I... (8 Replies)