10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all,
trying this using shell/bash with sed/awk/grep
I have two files, one containing one column, the other containing multiple columns (comma delimited).
file1.txt
abc12345
def12345
ghi54321
...
file2.txt
abc1,text1,texta
abc,text2,textb
def123,text3,textc
gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
2. Shell Programming and Scripting
Hi guys,
I have a text file named file1.txt that is formatted like this:
001 , ID , 20000
002 , Name , Brandon
003 , Phone_Number , 616-234-1999
004 , SSNumber , 234-23-234
005 , Model , Toyota
007 , Engine ,V8
008 , GPS , OFF
and I have file2.txt formatted like this:
... (2 Replies)
Discussion started by: An0mander
2 Replies
3. Shell Programming and Scripting
Unix box server version
***********
>uname -r
B.11.00
>echo $SHELL
/usr/bin/ksh
--> in this server, I have the path like /IMbuild/dev/im0serv1
---> in that directory I have the folders startup(.jsp files nearly 100 jsp's ) and scripts(contains .js files nearly 100 files) ... (9 Replies)
Discussion started by: pasam
9 Replies
4. UNIX for Dummies Questions & Answers
the text file like below's
input:
aaaaaaaaafdsfsda
sdfsadfasdfasfds
sdfadsf
asdfadf
asdfa
adfsfsafas
sdfsfafads
asdfasdfsa
I want to print out consecutive two line
output:
aaaaaaaaafdsfsda (1 Reply)
Discussion started by: vincent_W
1 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
I am sitting on HPUX. I want to change the exit into #exit, which appears into 3red line of code in shell scripting, wondering how shell script to be called up to perform action. I have following code in all files. Now, I need to find the text exit and replace into #exit.
#!/sbin/sh... (10 Replies)
Discussion started by: alok.behria
10 Replies
6. Shell Programming and Scripting
Hello,
Can anybody help me to correct my sed syntax to find the string and print previous two lines and current line and next one line.
i am using string as "testing"
netstat -v | sed -n -e '/test/{x;2!p;g;$!N;p;D;}' -e h
i am able to get the previous line current line next line but... (1 Reply)
Discussion started by: nmadhuhb
1 Replies
7. Shell Programming and Scripting
Hello All,
I have a following task that I need to accomplish through a script or program and I am looking for some help as I have exhausted my ideas.
1. given: a text file with thousands of lines
2. find: pattern A in file and get line number ( grep -n works)
3. find: the first occurence of... (14 Replies)
Discussion started by: PacificWonder
14 Replies
8. Shell Programming and Scripting
I have a file (OMlog0) that is quite large, I need to find the line "Automatic Recharge Audit Process Finished" and output that line and the time stamp that occurs two lines previous. The line that I was using is "sed -n '/Automatic Recharge Audit Process Finished/,/No errors/p' /sn/log/OM* >... (8 Replies)
Discussion started by: grinds
8 Replies
9. Shell Programming and Scripting
i have this text file name test.txt which contain :
aaaaa bbb
iiiiiiiiiiiii ccf
ddaaa ddd
and i need a script that can print out the line numbers using a while loop..
so when the script is run..it will have this:
1
2
3
any ideas? :) thanks guys (4 Replies)
Discussion started by: forevercalz
4 Replies
10. Shell Programming and Scripting
Hi,
I want to write a small script to search for a text in file and when its found I want to print the next line.
I try to write that script but I could not manage it, I just write the following script the find the exact line but I want the next line.
$ sed -n -e '/Form not/p' test.txt... (2 Replies)
Discussion started by: alijassim
2 Replies