9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
#!/bin/awk -f
BEGIN {i=1;file="modified.txt"}
{
if ($0 !~ /^DS:/) {print $0 >> file} else {
if ($0 ~ /^DS:/) {print "DS: ",i >> file;if (i==8) {i=1} else {i++}};
}
}
END {gzip file}
Can someone explain to me how this above script works, I got it from a friend but not able... (3 Replies)
Discussion started by: Kamesh G
3 Replies
2. Shell Programming and Scripting
cat teledir.txt
jai sharma 25853670
chanchal singhvi 9831545629
anil aggarwal 9830263298
shyam saksena 23217847
lalit chowdury 26688726
If i use the below command , it is giving me the output with "," in between two name. how ? and also i would like to know the reason for the space used in... (1 Reply)
Discussion started by: Antony Ankrose
1 Replies
3. Shell Programming and Scripting
I am learning SED and just following the shell scripting book, i have trouble understanding the grep and sed statement,
Question : 1
__________
/opt/oracle/work/antony>cat teledir.txt
jai sharma 25853670
chanchal singhvi 9831545629
anil aggarwal 9830263298
shyam saksena 23217847
lalit... (7 Replies)
Discussion started by: Antony Ankrose
7 Replies
4. Shell Programming and Scripting
Hi All,
can you please help me to figured out what's the meaning of this.
${SERVER_DATABASE} -b << EOF 2>>/dev/null
THanks, (3 Replies)
Discussion started by: nikki1200
3 Replies
5. Shell Programming and Scripting
Hey forum,
I have a problem with a script what used to work, but suddenly is not working anymore. I have been trying different things for an hour now and I give up :D .
#!/bin/sh
asukoht=`pwd`
template=$1
for values in... (4 Replies)
Discussion started by: mario8eren
4 Replies
6. Shell Programming and Scripting
I am relatively new to Shell Scripting. I can't understand the following two scripts. Can someone please spare a minute to explain?
1) content s of file a are
(021) 654-1234
sed 's/(//g;s/)//g;s/ /-/g' a
021-654-1234
2)cut -d: -f1,3,7 /etc/passwd |sort -t: +1n gives error (3 Replies)
Discussion started by: shahdharmit
3 Replies
7. Shell Programming and Scripting
Hello,
can someone please explain me what the following commands do.. i know the output but i would like to understand the break down of what they do step by step.
1) sed -n "/ $(date +\%R -d "-1 min")/,$"p req.txt| wc -l
2)
awk '/19:00/,/22:00/' app.log |grep "mytesturl"|grep... (2 Replies)
Discussion started by: niks
2 Replies
8. UNIX for Dummies Questions & Answers
Ok, i've been trying to write some shell scripts. nothing challenging, but just automating
All of the tutorials i read say to start the file with
#!/bin/bash
or whatever your path to bash is.
So i do it, and all of my scripts error out saying ./nameofscript:command not found
when i... (4 Replies)
Discussion started by: severndigital
4 Replies
9. UNIX for Dummies Questions & Answers
how i can download this game n start it :S (5 Replies)
Discussion started by: BoyArcher
5 Replies