10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file which comes every day and the file data look's as below.
Vi abc.txt
a|b|c|d\n
a|g|h|j\n
Some times we receive the file with only a new line character in the file like
vi abc.txt
\n (8 Replies)
Discussion started by: rak Kundra
8 Replies
2. Shell Programming and Scripting
Hi All,
I have different type of file (.txt,.csv,.xml) format in my current directory. My requirement is that I need to remove the last character from the file format.
Example
count.txt$
csp_rules.csv^
Date.xml~
Need Output:
count.txt
csp_rules.csv
Date.xml
How to do that?.... (5 Replies)
Discussion started by: suresh01_apk
5 Replies
3. Shell Programming and Scripting
Hi All
Please help me to remove the first 2 character from the file name.
files are like this
$ ls
12aman file
13atul si
56rana se
I want to remove the first 2 char which are numbers.
I want the o/p like thus
aman file
atul si
rana se (8 Replies)
Discussion started by: atul9806
8 Replies
4. Shell Programming and Scripting
Hi guys,
I am new to shell scripting and I have a small problem...If someone can solve this..that would be great
I am trying to form a XML by reading a flat file using shell scripting
This is my shell script
LINE_FILE1=`cat FLEX_FILE1.TXT | head -1 | tail -1`
echo... (1 Reply)
Discussion started by: gowrishankar05
1 Replies
5. HP-UX
Hi Experts,
I have data coming in 4 columns and there are new line characters \n in between the data. I need to remove the new line characters in the middle of the row and keep the \n character at the end of the line.
File is comma (,) seperated.
Eg:
ID,Client ,SNo,Rank
37,Airtel \n... (8 Replies)
Discussion started by: sasikari
8 Replies
6. Shell Programming and Scripting
Hi All,
I have a input like this.
01
i want the output like this.
1
But if the input file is like
11 i should not do anything.
Can anyone please help to get a command to do this.
thanks,
Giri.
---------- Post updated at 02:11 AM ---------- Previous update was at 02:04 AM ----------... (5 Replies)
Discussion started by: girish.raos
5 Replies
7. UNIX for Dummies Questions & Answers
Dear Members,
I have a file which is a single line file. It has "\" character and i need to replace this character with a new line character.
How can we do this?
I tried with sed but it did not work.
sed 's//"\n"/g' t1 > t2Thanks
Sandeep (3 Replies)
Discussion started by: sandeep_1105
3 Replies
8. Shell Programming and Scripting
Hi,
I'd like to ask for some help with the following:
I've cut a couple of columns of file1 to create file2 with the following code:
cur -f 1,3,8 file1 > file2
Then I need to transfer file 2 from UNIX to Windows and use it further.
Unfortunatelly, for some reason the line is displayed... (4 Replies)
Discussion started by: zajtat
4 Replies
9. Shell Programming and Scripting
Hi All,
I have an input_file below and i would like to use Perl to search for the term "aaa" and output the 3rd term in the same row as "aaa".For Example, i want to search for the term "ddd" and would want the code to ouput the 3rd term in the same row which is "fff". Can somebody help ?
... (28 Replies)
Discussion started by: Raynon
28 Replies
10. Programming
hi floks !
i'd like to know how can i transmete a character or a string from my source code to a term and make it interpret or un by the shell wich is running in my term.
I'd like to create a Term from my code (and get its file descriptor) and then transmete each char typed on the keyboard to... (1 Reply)
Discussion started by: the_tical
1 Replies