10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I'm new with sed, and i am really confused with slashes, backslashes, parentheses, I've tried reading some beginner's guide, but still trouble fixing this problem, do you have any tips where or what to read to learn more about sed? can you also help me with my problem?
Note: I was tasked to use... (4 Replies)
Discussion started by: akopocpoypoy
4 Replies
2. Shell Programming and Scripting
I have written a script to parse data from some files on a Solaris 10 system and send the output to a CSV formatted file. The code snipped i am using to pull the data is as follows....
src_line=$(sed -n "/^search_pattern$/{=;}" $file)
for i in $src_line
do
start_line1=$(( i + 9 ))
nawk -v... (4 Replies)
Discussion started by: electricheadx
4 Replies
3. Shell Programming and Scripting
how can i make this sed command run faster?
sed '51000000,51347442!d' file
and
sed '51347442,$ !d' file
File is a 9GB in size.
it runs on sunos 5.10 and linux red hat 6 servers and i use bash. (5 Replies)
Discussion started by: SkySmart
5 Replies
4. Shell Programming and Scripting
hi All,
i want to add the single digit front of the line in the report file and string compare with pattern file.
patter file: pattern1.txt
pattern num
like 4
love 3
john 2
report file: report.txt
i like very much
but john is good boy
i will love u
so after execute... (9 Replies)
Discussion started by: krbala1985
9 Replies
5. Shell Programming and Scripting
Hi,
I lack the utter fundamentals on how to craft an awk script.
I have hundreds of text files that were mangled by .doc format so all the lines are broken up so I need to join all of the lines of text into a single line. Normally I use vim command "ggVGJ" to join all lines but with so many... (3 Replies)
Discussion started by: n00ti
3 Replies
6. Shell Programming and Scripting
Hello Experts,
I am working on a small file editing script. Since all experts here are very generous to give me the complete code, I would take up the problem in steps so that I ensure my opportunity to learn.
AIM: The script has some commented and some uncommented lines. I need to :
... (2 Replies)
Discussion started by: hkansal
2 Replies
7. Shell Programming and Scripting
Hi All,
I have a doubt.
Can we assign a regular expression for pattern searching to a variable in a script and then use that variable in place of a regular expression in sed command.I tried but got some syntax error!!Is it not possible.Because my requirement is that i have a generic script to get... (8 Replies)
Discussion started by: usha rao
8 Replies
8. Shell Programming and Scripting
Hi there:)
Because of security requirements, It would be much better if I could truncate my logs in place using sed -i (or ?). I cant use the -i option on sed in my environment.
Can anyone help a DBA? (5 Replies)
Discussion started by: quigley007
5 Replies
9. Shell Programming and Scripting
:confused:Folks,
I have a file with 50 million records having 2 columns. I have to do the below:
1. Generate some random numbers of a fixed length.
2. Replace the second column of randomly chosen rows with the random numbers.
I tried using a little bit of perl to generate random numbers... (6 Replies)
Discussion started by: mvijayv
6 Replies
10. Shell Programming and Scripting
I have output like the following:
B D 20070116095820001 N D S0000579.LOG S0000582.LOG
B D 20070116095750001 N D S0000574.LOG S0000576.LOG
B D 20070116095734001 N D S0000570.LOG S0000573.LOG
B D 20070116095705001 N D S0000569.LOG S0000569.LOG
B D ... (5 Replies)
Discussion started by: rdudejr
5 Replies