![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Stop exe from command line | zing | High Level Programming | 4 | 01-29-2009 01:20 PM |
| adding semicolumn at end of line | scorpio | Shell Programming and Scripting | 2 | 05-19-2008 09:47 AM |
| Adding a columnfrom a specifit line number to a specific line number | Ezy | Shell Programming and Scripting | 2 | 05-12-2008 09:29 AM |
| sed - adding new line | sovixi | UNIX for Dummies Questions & Answers | 2 | 10-09-2007 10:06 AM |
| adding line terminator | thanuman | UNIX for Dummies Questions & Answers | 1 | 02-24-2005 07:53 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
In a loop, I want to append some text to a file without generating a new line (and then force a new line before re-iterating the loop). In the code below the first 'echo' command is OK as it uses '--n' for no new line. For the 'awk' line I *thought* I could solve it by using printf rather than print (and not using the normal '\n').
The loop is as below: do echo -n $testTimeNow $'\t' >> $HOME/temp/ss.tmp /usr/sbin/ss -i | awk -f awk_filter.tmp >> $HOME/temp/ss.tmp # A new line now echo "" >> $HOME/temp/ss.tmp done Note, awk_filter.tmp is ... /[match]/ {printf "%s %s" \$1, \$2 } but this isn't working. The 'awk' line in the loop *is* adding a new line in. Any and all suggestions appreciated! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|