10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All,
I am running into an issue. I have a very big file. Wants to split it in smaller chunks. This file has multiple header/ trailers. Also, between each header/trailer there are records. Number of records in each header trailer combination can vary. Also, headers can start with... (3 Replies)
Discussion started by: Gurkamal83
3 Replies
2. 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
3. UNIX for Dummies Questions & Answers
I have a single record large file, semicolon ';' and pipe '|' separated. I am doing a vi on the file. It is throwing an error "File to long"
I need to actually remove the last | symbol from this file.
sed -e 's/\|*$//' filename
is working fine for small files. But not working on this big... (13 Replies)
Discussion started by: Gurkamal83
13 Replies
4. Shell Programming and Scripting
I have a huge file semicolon( ; ) separated records are Pipe(|) delimited.
e.g
abc;def;ghi|jkl;mno;pqr|123;456;789
I need to replace the 50th field(semicolon separated) of each record with 9006. The 50th field can have no value e.g. ;;
Can someone help me with the appropriate command. (3 Replies)
Discussion started by: Gurkamal83
3 Replies
5. Shell Programming and Scripting
Hi All
I have written the following script:
#!/bin/ksh
while read cmdline
do
echo `$cmdline`
pid="$cmdline"
done<commands.txt
===========
commands.txt contains:
ps -ef | grep abc | grep xyz |awk '{print $2};
My objective is to store the o/p of the command in a variable and do... (8 Replies)
Discussion started by: rahulparo
8 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
I have a requirement here where I am dealing with a dynamic file. Each record in the file can contain anywhere between 1(min) to 42(max) Reject codes. For example I may have one record in the file having 3 reject codes and another record having 5 reject codes. The reject codes will be... (2 Replies)
Discussion started by: sujainarayan
2 Replies
7. UNIX for Dummies Questions & Answers
Hi
Am having issue on appending time stamp
I know the exact file names in the directory like
a.dat
b.dat
c.dat
e.dat
f.dat
I want to read all these file names and append the timestamp to each files like
a.dat.20090604,b.dat.20090604 and move to the different directory.
... (3 Replies)
Discussion started by: bobprabhu
3 Replies
8. UNIX for Advanced & Expert Users
HI All
I have csv file containing the data like this
Electrical Equipment,ElecEquip
"Engineering, Machinery & Equipment",Engineerin
Entertainment & Broadcasting,Entertain
The first and third record are fine,The issue with second records as it has comma enclosed with in inverted... (1 Reply)
Discussion started by: mohdtausifsh
1 Replies
9. Shell Programming and Scripting
I need to create a shell script having the menu with few options such as
1. Listing 2. Change permissions 3. Modify Contents 4. Delete Files 5. Exit
1. For 1. Listing: Display a special listing of files showing their date of modification and access time (side by side) along with their... (2 Replies)
Discussion started by: bab123
2 Replies
10. UNIX for Dummies Questions & Answers
Hi All,
I want to read a file in UNIX line by line.
Can u suggest me any command for this? (4 Replies)
Discussion started by: VENC22
4 Replies