10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Need to add a numeric & special char to end of the first line
Existing file:
12-11-16|11 2016 Jan 12:34:55|03:55|
13-10-16|10 2016 Jan 12:34:55|03:55|12-11-16|11 2016 Jan 12:34:55|03:55|
14-10-16|19 2016 Jan 12:34:55|03:55|13-11-16|11 2016 Jan 12:34:55|04:55|
15-10-16|18 2016 Jan... (11 Replies)
Discussion started by: Joselouis
11 Replies
2. Shell Programming and Scripting
Hi Gurus,
I need separate one file which is one huge line to mutiple line.
file like
abcd # bcd # def # fge # ged
I want to get
abcd
bcd
def
fge
ged
Thanks in advance (4 Replies)
Discussion started by: ken6503
4 Replies
3. Shell Programming and Scripting
Hi All,
I have 4 big files which contains one big line containing formatted character records, I need to format each file in such way that each File will have 95 Characters per line. Last line of each file will have newline character at end.
Before:-
File Name:- File1.dat
102 121340560... (10 Replies)
Discussion started by: lancesunny
10 Replies
4. Shell Programming and Scripting
I'm trying to add a '1' before a line that has the word "C_ID"
s/.*C_ID.*/&\n1/
The above code did what I need, but the '1' is added after the C_ID word :( Help please. (5 Replies)
Discussion started by: newbeee
5 Replies
5. UNIX Desktop Questions & Answers
hey ,
i want to check if the char "#" exist at the end of every line of txt file
and if it dosent then add it for example:
the cat jumped on my mom #
cars can run on water#
i cant get a date
blue
yellow#
will be:
the cat went back home#
cars can run on water#
i cant get a... (2 Replies)
Discussion started by: boaz733
2 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
I've searched for this but couldn't seem to find the answer I'm looking for. I have a text file that looks like this:
sgea0447 Earnings followed the same path. earnings followed the same path
sgea0448 Economic growth slowed further. economic growth slowed further... (13 Replies)
Discussion started by: pxalpine
13 Replies
7. UNIX for Dummies Questions & Answers
Hi,
this might be a basic question...
why is that wc -c counts 1 more per line than what is there.
for example,
> cat dum1.txt
123
12
> wc -c dum1.txt
7 dum1.txt
Thanks,
Sameer. (4 Replies)
Discussion started by: ensameer
4 Replies
8. Shell Programming and Scripting
Hi
I m having ifconfig -a o/p like
sbanlab1:ksh# ifconfig -a | egrep "flags|inet" | awk -F' ' '{print $1,$2}'
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL>
inet 127.0.0.1
lo0:1: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL>
inet 127.0.0.1
bge0:... (1 Reply)
Discussion started by: tarunn.dubeyy
1 Replies
9. UNIX for Advanced & Expert Users
Problem: I have a lot of files, the files first line should always have 4 spaces before any text. Occasionally some of the files will miss the leading spaces and it's a problem. This is only in the first line.
So if there are 4 spaces then text, do nothing. If there are not 4 spaces, add 4... (2 Replies)
Discussion started by: Vryali
2 Replies
10. Shell Programming and Scripting
I need to extract the character before the last "|" in the following lines, which are 'N' and 'U'. The last "|" shouldn't be extracted. Also the no.s of "|" may vary in a line, but I need only the character before the last one.
... (1 Reply)
Discussion started by: hidnana
1 Replies