10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Friends,
I am trying to scan line by line using awk and pull the values and pass it in variables and then will use the variables but doesn't work.
Please see below for details.
#more dbtest.sh
----------------------------------
#!/bin/bash
. $HOME/.bash_profile
while read line
do... (6 Replies)
Discussion started by: narunice
6 Replies
2. 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
3. Shell Programming and Scripting
Seems like this should be an easy thing to do (in bash shell), but can't get it figured out. We don't have an kind of scheduling functionality on our test system, so I'm trying to emulate having a process run every 8 hours, by using a control file with a date, and checking it every few minutes.... (5 Replies)
Discussion started by: billrow
5 Replies
4. UNIX for Dummies Questions & Answers
Hi ,
I have a file with a running sequence number. I need to append a date value mmdd format on to the first column.
for e.g.: The file contains records as
001 abc
002 cde
003 edf
004 fgh
005 hik
The output should be
1111001 abc
1111002 cde
1111003 edf
1111004 ... (1 Reply)
Discussion started by: kalyansid
1 Replies
5. UNIX for Dummies Questions & Answers
Hi
I have the data file in the one directory and i have to copy the file in the another directory with the timestamp.
EX:
/ab/cd/a.dat i need to copy this file to the another directory /ef/gh/.
while am copying i need to append the current timestamp in the file like... (3 Replies)
Discussion started by: bobprabhu
3 Replies
6. 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
7. Shell Programming and Scripting
Hi guys,
I am new to AWK and unix scripting. Please see below my problem and let me know if anyone you can help.
I have 2 input files (example given below)
Input file 2 is a standard file (it will not change) and we have to get the name (second column after comma) from it and append it... (5 Replies)
Discussion started by: sksahu
5 Replies
8. UNIX for Dummies Questions & Answers
Hi my prob statement is to create a new file or to append to the 1tst file the followign chages.
File 1: txt file.
portfolio No a b c d
abc 1 Any Any Any charString
cds 2 values values values charString
efd 3 can can can charString
fdg 4 come come come charString... (4 Replies)
Discussion started by: szchmaltz
4 Replies
9. Shell Programming and Scripting
Hi experts . . .
Sunsolaris 9 version
I have the script as below:
Am getting log file as : archive_today_.log
Please suggest.
##################################################
set 'date'
dd=$3
mon=$2
export mon
yyyy=$6
export yyyy
cd /oracle/P47/saparch (4 Replies)
Discussion started by: vrjalli
4 Replies
10. Shell Programming and Scripting
Hi,
I need to write a shell script (ksh) to read contents starting at a specific location from one file and append the contents at specific location in another file. Please find below the contents of the source file that I need to read the contents from,
File 1
-----# more... (5 Replies)
Discussion started by: dnicky
5 Replies