10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Following one line of awk code removes first 3 characters from each line but when I run the same code on another linux platform it doesn't work and only prints blank lines for each record. Can anyone please explain why this doesn't work? (31 Replies)
Discussion started by: later_troy
31 Replies
2. Shell Programming and Scripting
Hello Friends,
I'm trying something hard (for me) to create a report script,normally the following script works:
Echos are just for cosmetic touch,
echo -n "\n-----\t----------\t-------------\t\t--------------\t\t--------\n
COUNT\tEVENT_TYPE\tRESPONSE_CODE\t\tINTERNAL_ERROR\t\tFLOWNAME... (7 Replies)
Discussion started by: EAGL€
7 Replies
3. Shell Programming and Scripting
Hi All,
I am trying to run awk command on .DAT file and it is not working. The same command is working on .txt file:
Contents of the file ZZ_55555555_444444_ZZZZZZ_7777777_888_99.DAT:
HEADER|ZZ_55555555_444444_ZZZZZZ_7777777_888_99.DAT... (10 Replies)
Discussion started by: sagar.cumar
10 Replies
4. Shell Programming and Scripting
dear All,
my awk system command isn't working or rather I'm missing something in my command. Appreciated , if anyone can assist me what exactly I'm missing ??
awk ' /^/ {
> c=split($3,a,"/") ;for(n=1; n<=c; ++n)
> {
> if (system("test -d" /home/cubedata/20120104/"$1"/"a")) {
> print... (5 Replies)
Discussion started by: manas_ranjan
5 Replies
5. Shell Programming and Scripting
Hi All
I have fired a command in linux
table=`echo ${file_name} | awk '{FS="/"; print $NF}' | awk '{FS="."; print $1}'`
where file_name has
/data/ds/dpr_ebicm_uat/backfill/temp/etl_app_info.csv
/data/ds/dpr_ebicm_uat/backfill/temp/etl_app_jobs.csv ... (10 Replies)
Discussion started by: vee_789
10 Replies
6. Shell Programming and Scripting
Hi,
When i run the below command i am able to get the output.
awk '/BEGIN DSSUBRECORD/{c=3;next}c-->0' abc.txt |
awk '/END DSSUBRECORD/{exit}{print}' |
awk '/Owner/{exit}{print}' |
awk '{n2=n1;n1=n;n=$0;if(NR%3==0){printf"%s,%s,%s\n",n2,n1,n}}'
Output:
Name "file_name", ... (5 Replies)
Discussion started by: onesuri
5 Replies
7. Shell Programming and Scripting
Hi all,
Trying to write a script that reads a file and prints everything after a certain string is found to the end of the file. Awk is giving me an error and not sure why it doesn't work:
# cat test_file
Mon Nov 16 2009 16:11:08
abc
def
Tue Nov 17 2009 16:08:06
ghi
jkl
Wed Nov 18... (8 Replies)
Discussion started by: jamie_collins
8 Replies
8. Shell Programming and Scripting
I was trying commands within awk. i got stuck here. i take 2 files.
cat input
first
second
third
fourth
fifth
sixth
seventh
eighth
ninht
tenthcat add
***************
Nirbhay
***************i run the command
awk '{ if ( NR == 5 ) { print system("cat add") "\n" $0 } else {... (4 Replies)
Discussion started by: nirbhay
4 Replies
9. Shell Programming and Scripting
I am using Sun Solaris 5.8
I am trying to run a system command such as ls and echo inside awk, but when I run the following code system echo is not displayed.
bash-2.03$ ls | awk 'BEGIN {
print "first print"
system("echo system echo")
print "second print"
... (1 Reply)
Discussion started by: rakeshou
1 Replies
10. Shell Programming and Scripting
I wanna use a system function to deal with several data. So I use awk variable FILENAME to transfer the file directory to system command, but it does not work.
I use a shell function "out_function" to deal with data and save the result in another directory with the same file name.
How can I... (2 Replies)
Discussion started by: zhynxn
2 Replies