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
The awk below works fine if I manually remove the () from file1. However, when I try to use tr to remove the () and then | into awk to run the calculation no result is obtained. Is there a way to tell the awk to ignore the () in fiile1 if they are there or do I need to remove them first? Thank... (5 Replies)
Discussion started by: cmccabe
5 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have files in a folder that I would like all renamed without the preceding number and parenthesis. For example, I have files of the name
08) Great Good Fine Ok - Not Going Home
09) Roosevelt - Small Hours
10) RAC - I Should've Guessed Feat. SPEAK
and I would like them all to be... (4 Replies)
Discussion started by: jyu429
4 Replies
4. Shell Programming and Scripting
In a 10-50GB file , at end of file there is Control-z character
tried the below options,
1. perl -p -i -e 's/^Z//g' new.txt
2. perl -0777lwi -032e0 new.txt
and Sed command, dos2unix etc
it takes more time to remove the control-z. need a command or perl program to GO TO LAST LINE OF FILE ... (7 Replies)
Discussion started by: prsam
7 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. 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
7. 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
8. Shell Programming and Scripting
i want to split the input by a space and remove specific characters like full stop, comma...... etc. and then save each word in an array.
i got something below, but it didn't work. can anyone please help me?
Thank you
#!/usr/bin/perl -w
while (<>)
{
$line = <>;
@word = split(' ',... (6 Replies)
Discussion started by: mingming88
6 Replies
9. Shell Programming and Scripting
I use SAS (a statistical software) and have to remove last character or the last 1/2 numbers that appear after characters from the string using Perl Regular Expression (which is recognized by SAS).
Input: f183ii10 f183ii2 f182ii1 f182ii2 f183iim f22ii f22ii11 f22ii12 pmh4 pmhm
Desired... (2 Replies)
Discussion started by: ospreyeagle
2 Replies
10. Shell Programming and Scripting
Hi all,
I'm stuck on this last part...am running a simple script under AIX to extract NetView host IP addresses. The line below returns the IP address in parenthesis with a trailing colon, i.e.
ping -c 1 $name |grep \( | awk '{ print $3 }' --------> returns
(a.b.c.d):
How can I only... (10 Replies)
Discussion started by: livinthedream
10 Replies