Thanks all... It's working. I was supposed to pass variable for 1000 and XYZ-1234 there. So I changed the command to ,
When using single quote it was not working.
Last edited by Franklin52; 03-26-2010 at 11:50 AM..
Reason: Please use code tags!
Hi,
Does anyone know if its possible to add something like an end of line like c or java in unix?
dirs=/home/nosnam
var=''
for dir in $dirs
do
listDirs=`ls -d1 $dir/*`
for eachList in $listDirs
do
listRepos=`du -ks $eachList | awk '{ x+=$1 }; END { print x... (4 Replies)
Hi,
I need some help in knowing how I can append tabs at the end of each line...
The data looks something like this:
field1, field2, field3, field4
1 2
3 4 5
I have values in field1 and field 2 in the first row and I would like to append tab on field3 and field4 for the first row..and in... (6 Replies)
Hi i would like to add line numbers to end of each line in a file.
I am able to do it in the front of each line using sed, but not able to add at the end of the file.
Can anyone suggest
The following code adds line number to start of each line
sed = filename | sed 'N;s/\n/\t/'
how can i... (5 Replies)
hi,
i have file which is having large sql query
eg :
i am executing this sql file but now i want to add ; after query on same line
i.e. i should look like
any idea how to achieve it ? (6 Replies)
I have a file with varying record length in it. I need to reformat this file so that each line will have a length of 100 characters (99 characters + the line feed).
AU * A01 EXPENSE 6990370000 CWF SUBC TRAVEL & MISC
MY * A02 RESALE 6990788000 Y... (3 Replies)
Hello
How can I add a string (always the same) at the end of a specific line in a file...
The file is:
000000001 041 L $$aspa
000000001 088 L $$aJ.E.N. 551
000000001 090 L $$aINFORMES JEN
000000001 100 L $$aautor 1
----
000000002 041 L $$aeng
000000002 088 L $$aJ.E.N. 1... (13 Replies)
How to add a comma at the end of each line in this file?30 1412
30 3352
30 5254
30 5543
30 7478
3 28
3 30
3 39
3 54
3 108
3 152
3 178
3 182
3 214
3 271
3 286
3 300
3 348
3 349
3 371 (3 Replies)
i want to add a white-space at the end of each line for my inp.file, but when i do it, the result is a new line with a white-space between each line!
my input:
2012 0811 1223 15.2 L 38.393 46.806 9.0 Teh 78 0.5 6.5LTeh 1
GAP=74 ... (5 Replies)
Seems simple but ive been searching for a good hour of so
I have a text file and would like to add a string to the end of line 5 ( as an example)
to ake tings hard the line number we have to add the text to is stored in a variable cunningly name $Line_to_append
any ideas on how this could... (2 Replies)