10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello.
I would like to make this bash command working.
In the following code, the bash variable 'ZYPPER_LOCAL_REP' contain a full pathname like '/path/to/path/somewhere'
The command list all available repositories,
search for the string 'zipper_local'
then on the same line search for... (4 Replies)
Discussion started by: jcdole
4 Replies
2. Shell Programming and Scripting
I am trying to use awk to create (in this example) 3 seperate text file from the unique id in $1 in file, if it starts with the pattern aa. The contents of each row is used to populate each text file except for $1 which is not needed. It seems I am close but not quite get there. Thank you :).
... (3 Replies)
Discussion started by: cmccabe
3 Replies
3. Shell Programming and Scripting
HI all,
I have data in a file that looks like this:
1 HOW _ NNP NNP _ 3 nn _ _
2 DRUGS _ NNP NNP _ 3 nn _ _
3 ACT _ NNP NNP _ 0 null _ _
4 : _ ... (3 Replies)
Discussion started by: owwow14
3 Replies
4. Shell Programming and Scripting
Hi
I am trying to filter some data using awk. I have a statement-
awk 'BEGIN { FS = "\n" ; RS = "" } { if ( $6 = "City: " ) { print "City: Unknown" } else { print $6 } }'`
The $6 values are
City: London
City: Madrid
City:
City: Tokyo
This expression seems to catch all the lines... (4 Replies)
Discussion started by: jamie_123
4 Replies
5. Shell Programming and Scripting
Both of these fail. One has two form feeds, the second form leaves all the backslashes.
bold='\(code\|command\|var\|samp\|option\|strong\)'
sed -e "s;@${bold}{"'\(*\)};\fB\2\fP;g'
sed -e "s;@${bold}{"'\(*\)};\\fB\2\\fP;g'
Obviously, I'm trying to change texi markup into man page markup, but it... (3 Replies)
Discussion started by: bkorb
3 Replies
6. Shell Programming and Scripting
Hi,
I have a input file with many records as below:
1J4RR4GG0BC508200 68646 1 N M
i want my output file to be like with columns included dgismdh and timestamp :
Example:
1J4RR4GG0BC508200 68646 1 N M dgismdh 2012-02-21 07:22:25.98591
How to do it.can we do using awk?
Pls help. (6 Replies)
Discussion started by: sonam273
6 Replies
7. Shell Programming and Scripting
Hi Experts,
The content of the raw file:
date,nomsgsent,nomsgnotdeliver,nomsgdelay
201003251000,1000,1,2
201003251000,900,0,0
201003251000,1450,0,0
201003251000,1230,0,0
However, sometimes, the column will missing in the raw files:
e.g.
date,nomsgsent,nomsgdelay... (8 Replies)
Discussion started by: natalie23
8 Replies
8. Shell Programming and Scripting
Hi,
I have a sql file that runs something like this
vi Test.sql
REVOKE EXECUTE ON DEMO_USER.SQC_SAMP FROM PUBLIC;
REVOKE EXECUTE ON DEMO_USER.SQC_SAMP FROM DEMO_READ;
REVOKE SELECT ON DEMO_USER.DEMO_NOMINEE_TEST FROM DEMO_READ;
REVOKE EXECUTE ON DEMO_USER.SQC_SAMP FROM... (3 Replies)
Discussion started by: rajan_san
3 Replies
9. Shell Programming and Scripting
Im using awk and I want the output filename to contain the first field of the input file.
Ex.
1 dddd wwwww
1 eeeee wwww
1 wwww eerrrr
2 eeee eeeeee
I want the output files to be xxx1 and xxx2
Thank you (4 Replies)
Discussion started by: yahyaaa
4 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I have problem in including date in side awk,
my code as follows:
performace=performace.txt
reporttime=`date`
cat $performace | grep "testString" | awk '{ if ($3 > 20 ){print $reporttime $1 $2 $3}}' >> $rpt
$reporttime is not reflecting properly in my report file($rpt)?
how to... (3 Replies)
Discussion started by: redlotus72
3 Replies