9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
I have a file like below. In the field 9 I am having 14,014,3,001/009 on the records. I want to convert the field to a three digit value. For example 14 should 014 , 3 should 003
11050;11001;;CREDITTRANC;5293218;NRATL;;;11095;;-1;14;3;29=0000;1.25... (5 Replies)
Discussion started by: arunkumar_mca
5 Replies
2. Shell Programming and Scripting
from
a(depends: )
bb(depends:lmbench )
cc(depends: )
CONFIG_DEFAULT1=y
CONFIG_IOSCHED1=y
CONFIG_CGROUP1=y
ddd(depends: )
CONFIG_GENERIC_CPU1=y
CONFIG_CRYPTO_AES_NI1=m
to
1. a(depends: )
2. bb(depends:lmbench )
3. cc(depends: )
CONFIG_DEFAULT1=y
... (8 Replies)
Discussion started by: yanglei_fage
8 Replies
3. Shell Programming and Scripting
Prepending lines with: your, the, a or an based on 1st letter match. You'll see my problem below:
sed '/^p\|^f\|^c\|^d\|^l/ s/^/your /' list.txt > your.txt && sed '/^v\|^j\|^k\|^m\|^n\|^s/ s/^/the /' your.txt > the.txt && sed '/^b\|^g\|^h\|^q\|^r\|^t\|^w\|^z/ s/^/a /' the.txt > a.txt && sed... (10 Replies)
Discussion started by: p1ne
10 Replies
4. Shell Programming and Scripting
Hello,
Is possibly there a way to prepend the filename to its content without a third file? The reason is to add a header to each file contents to distinguish each other when they are pasted side-by-side.
sample.txt:
XLOC_001 0
XLOC_002 23
XLOC_003 4
XLOC_012 6output (with the same... (4 Replies)
Discussion started by: yifangt
4 Replies
5. Shell Programming and Scripting
hi all ,
i had the below sed command to append header at the starting of my output file ....
sed -i -e '1i saikumar suresh hemanth' output.txt
i want to append spaces to the Name saikumar how can i append with in this command ....? (1 Reply)
Discussion started by: hemanthsaikumar
1 Replies
6. Shell Programming and Scripting
Hi,
I have a file with email header information. I would like to change the Subject line.
Subject: ** PROBLEM Host Alert: server.domainname is DOWN **
I'd like to change this line such as to look,
Subject: serverID ACK Fw: ** PROBLEM Host Alert: server1.domainname is DOWN**
How can I... (2 Replies)
Discussion started by: upengan78
2 Replies
7. Shell Programming and Scripting
Hi,
I have a file 'tmp.dat' that contains the below data:
81763
40829
30405
80452
I want to prepend a ' character to the beginning of every line, and I want to append ', at the end of every line. Below is what I expect:
'81763',
'40829',
'30405',
'80452',
Can anyone help me?
... (3 Replies)
Discussion started by: ChicagoBlues
3 Replies
8. UNIX for Dummies Questions & Answers
I have two files. File 'a' has contents:
1|1
2|2
3|3
4|4
and file 'b' has contents:
abc|def
hij|klm
nop|qrs
tuv|wxy
I would like to prepend file 'a' to file 'b' (with pipe) such that the contents of 'b' will be:
1|1|abc|def
2|2|hij|klm
3|3|nop|qrs
4|4|tuv|wxy (3 Replies)
Discussion started by: ChicagoBlues
3 Replies
9. Shell Programming and Scripting
Hi, I am a shell scripting newbie. I am in need of a shell script that will prepend the name of the parent directory to the child directory.
For example if the shell script called rename.sh is invoked with ">rename.sh /home/foobar/Simple" and the structure of the folder Simple is :
Simple... (7 Replies)
Discussion started by: kalichar
7 Replies