10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a file that includes strings with special characters, eg
line: 1 - special 1
line: = 4
How can I grep the lines of file1 from file2, line by line?
I used fgrep and egrep to grep a particular line and worked fine, but when I used:
cat file1|while read line;do... (2 Replies)
Discussion started by: FelipeAd
2. Shell Programming and Scripting
All, I appreciate any help you can offer here as this is well beyond my grasp of awk/sed...
I have an input file similar to:
&LOG Part: "@DB/TC10000021855/--F"
&LOG Part: "@DB/TC10000021852/--F"
&LOG Cloning_Action: RETAIN
&LOG Part: "@DB/TCCP000010713/--A"
&LOG... (5 Replies)
Discussion started by: KarmaPoliceT2
3. UNIX for Dummies Questions & Answers
I am very new to awk. I have what is probably a very simple question. I'm trying to get the max value of column 1, but also print column 2. My data looks like this:
So in this case... (2 Replies)
Discussion started by: amandarobe
4. Shell Programming and Scripting
I am running a script sample.sh in bash environment .In the script i am using sed and awk commands which when executed individually from terminal they are getting executed normally but when i give these sed and awk commands in the script it is giving the below errors :-
./sample.sh: line... (12 Replies)
Discussion started by: satishmallidi
5. Shell Programming and Scripting
I am trying to retrieve that max 'year' in a text file that is delimited by tilde (~). It is the second column and the values may be in Char format (double quoted) and have duplicate values.
Please help. (4 Replies)
Discussion started by: CKT_newbie88
6. Shell Programming and Scripting
I know this has been asked before but I just can't parse the syntax as explained. I have a set of files that has user information spread out over two lines that I wish to merge into one:
User1NameLast User1NameFirst User1Address
User2NameLast User2NameFirst User2Address... (11 Replies)
Discussion started by: walkerwheeler
7. Shell Programming and Scripting
Hi I'm new to sed, and need to add characters into a specific location of a file, the fileds are tab seperated.
text <tab> <tab> text <tab> text EOL
I need to add more characters to the line to look like this:
text <tab> <tab> newtext <tab> text <tab> text EOL
Any ideas? (2 Replies)
Discussion started by: tangentviper
8. Shell Programming and Scripting
I know this should be simple, but I've been manning sed awk grep and find and am stupidly stumped :(
I'm trying to use sed (or awk, find, etc) to find 4 characters on the second line of a file.txt 44-47 characters in. I can find lots of sed things for lines, but not characters. (4 Replies)
Discussion started by: unclecameron
9. Shell Programming and Scripting
I have a logfile which is in this format:
Is there a way to read the logfile line by line every time I execute the code and put the two numbers in the line in two separate variables?
1211667249500#3265... (7 Replies)
Discussion started by: dejavu88
10. Shell Programming and Scripting
while read line
str1=`grep 'customernumberR11' file1 | cut -c 20-21`
str2=`grep 'newnumberR11' file1 | cut -c 15-16`
if ; then
sed -e "s/newnumberR11/ s/$str2/\$str1/g" $line
done < file1 (4 Replies)
Discussion started by: LAKSHMI NARAYAN