10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi team,
i need a script for renaming a file with sequence number. script get a file from one directory'/home/billing/Cmm/sms/sms_tmp' append sequence no at the end of file name and move a file to other directory/home/billing/Cmm/sms/.
actual file is cdr201508271527 file after renaming ... (3 Replies)
Discussion started by: mfaizan40
3 Replies
2. Shell Programming and Scripting
Hi Gurus,
Need help. I'm a beginner in Unix. I have a requirement, need to add or append newline (\n) character in file.
Sample Data:
1|Main|Test|~#
2|Main|Hello|~#
3|Main|Unix|~#
4|Main|File|~#Output:
1|Main|Test|~#
2|Main|Hello|~#
3|Main|Unix|~#
4|Main|File|~#\n -- append only... (13 Replies)
Discussion started by: Gouri Solleti
13 Replies
3. UNIX for Advanced & Expert Users
Here is my dir structure:
/tmp/dave/myappend.txt
/tmp/dave/dir1/test.txt
/tmp/dave/dir2/test.txt
/tmp/dave/dir3/test.txt
/tmp/dave/dir4/test.txt
I want to append the contents of myappend.txt to the end of each file with the name "test.txt" in all dirs in /tmp/dave/
I have tried this:... (2 Replies)
Discussion started by: bigd213
2 Replies
4. Shell Programming and Scripting
I want to append file with a string but before doing that i want to check if this string already exist in that file.I tried with grep on Solaris 10 but unsuccessful.Man pages from grep seems to suggest if the string is found command status will be 0 and if not 1.But i am not finding it.May be i... (2 Replies)
Discussion started by: sahil_shine
2 Replies
5. UNIX for Dummies Questions & Answers
Hi,
My requirement is to append a date in format DDMMYYYYHHMISS at the end of first line of file which is HEADER. I am trying command
sed -i '1s/.*/&<date_format>/' <file_name>
Where <date_format>=`date +%m%d%Y%H%M%S`
I am somehow misisng the right quotes ti get this added in above... (2 Replies)
Discussion started by: sanjaydubey2006
2 Replies
6. Shell Programming and Scripting
can anyone tell me please ......how to append a new field at the end of a file with the help of sed or some other command in bourne shell (8 Replies)
Discussion started by: amitpta
8 Replies
7. Shell Programming and Scripting
Hi ,
I have below file with 13 columns. I need 2-13 columns seperated by comma and I want to append each row with a string "INSERT INTO xxx" in the begining as 1st column and then a variable "$node" and then $2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13 and at the end another string " ; COMMIT;"
... (4 Replies)
Discussion started by: Vaddadi
4 Replies
8. Shell Programming and Scripting
I have file called xx
Now i want to rename this file as xxYYYYMMDD_HHMIAM.xls
Here is my code..
export DATE1=`date +%Y%m%d`
mv xx xx$DATE1
This code renames as xxYYYYMMDD
Now how can i append HHMIAM at the end of the file?
Any help is appreciated... (3 Replies)
Discussion started by: govindts
3 Replies
9. Shell Programming and Scripting
Hi , I have the below file with 6 columns.I want to append 'File1' as the 1 column to the file. i have the sample code .It is not working . can u please correct this or make new one .....
awk 'print {'File1',$1,$2,$3,$4,$5,$6}' Source_File> Result_File
Source_File:... (6 Replies)
Discussion started by: satyam_sat
6 Replies
10. Shell Programming and Scripting
Hi,
I need to append string "Hi" to the beginning of the lines containing some specific string. How can I achieve that?
Please help.
Malay (1 Reply)
Discussion started by: malaymaru
1 Replies