9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Guys,
IF i have to append data to a variable, i simply use the following. What can i do to append data to the beginning?
VAR+="data" (6 Replies)
Discussion started by: srkmish
6 Replies
2. Shell Programming and Scripting
It is very simple to remove a hyphen from a word anywhere in that word using a simple sed command (sed -i 's/-//g' filename), but I am not able to figure out how to do this:
For example,
apple
-orange
tree
pipe-
banana-shake
dupe-
What my output should look like:
apple
orange
tree... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
3. Shell Programming and Scripting
Hi,
I have multiple files having many lines like as bvelow:
file Name a.txt
abc def
def xyz
123 5678
file Name b.txt
abc def
def xyz
123 5678
I would like to append files in the below format to a new file:
file Name c.txt (7 Replies)
Discussion started by: rramkrishnas
7 Replies
4. Shell Programming and Scripting
I want to append file names at the beginning of a line for each row
file content
abc.txt.gz 123|654|987
bcd.txt.gz 876|trf|kjh
I want a single output file with below format
abc.txt.gz|123|654|987
bcd.txt.gz|876|trf|kjh
This one is working but only with unzip files,need to have... (3 Replies)
Discussion started by: rakesh5300
3 Replies
5. Shell Programming and Scripting
I am writing a code to append some numbers in the beginning of each line in all the files present in a directory. The number of files are really huge. The files are numbered as 1.sco, 2.sco, 4.sco (Note: 3.sco is missing).
The files currently look like this:
1.sco
2 3
5 6
6 7My task is to... (4 Replies)
Discussion started by: shoaibjameel123
4 Replies
6. Shell Programming and Scripting
Hello friends,
I have a file which consists of many rows, I use a couple of commands to convert it so i can use in a database query for filtering. I need the first columns (msisdns) in a row, seperated with commas,
9855162267,4,5,2010-11-03 17:02:07.627
9594567938f,5,5,2010-11-02... (9 Replies)
Discussion started by: EAGL€
9 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have a file x which is being upated continuously.
I want to add file y in the file x but at the beginning of file x.
file x file y After commands file x
eeee aaaa aaaa
gggg bbbb bbbb
hhhh... (2 Replies)
Discussion started by: baanprog
2 Replies
8. Shell Programming and Scripting
Hi,
Fairly new to unix scripting, hoping to get some help.
using AIX v5
Basically I have 3 files 1). Header record 2). many detail record 3). Trailer record
My desired result is 1 file which contains Heaeder, Detail, Trailer
Currenty I am using a series of:
... (8 Replies)
Discussion started by: CBZ
8 Replies
9. UNIX for Dummies Questions & Answers
Is there an option, for cat, head, tail, or is there any way, to display a file from last line to first? For example, my file
looks like this:
aaaa
bbbb
cccc
eeee
and I would like to print or display it like this:
eeee
cccc
bbbb
aaaa
thanks (5 Replies)
Discussion started by: jpprial
5 Replies