10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
My file has the entries like below...
/dev/sds
/dev/sdak
/dev/sdbc
/dev/sdbu
I want to make the file like below
echo 1 > /sys/block/sds/device/rescan
echo 1 > /sys/block/sdak/device/rescan
echo 1 > /sys/block/sdbc/device/rescan
echo 1 > /sys/block/sdbu/device/rescan (2 Replies)
Discussion started by: saravanapandi
2 Replies
2. Linux
I have a .CSV file when I check for the special characters in the file using the command cat -vet filename.csv, i get very lengthy lines with "^@", "^I^@" and "^@^M" characters in between each alphabet in all of the records. Using the code below file filename.csv I get the output as
I have a... (2 Replies)
Discussion started by: dhruuv369
2 Replies
3. UNIX for Dummies Questions & Answers
I'm trying to remove all of the empty lines at the end of a Tab delimited file. They have no data just tabs.
I've tried may things, here are a couple:
sed /^\t.\t/d File1 > File2
sed /^\t{44}/d File1 > File2
What am I missing? (9 Replies)
Discussion started by: SirHenry1
9 Replies
4. UNIX for Dummies Questions & Answers
Hello,
I have records like below that I want to remove any five characters from the end of the string before the double quotes unless it is only an asterik.
3919,5020 ,04/17/2012,0000000000006601.43,,0000000000000000.00,, 132, 251219,"*"
1668,0125 ... (2 Replies)
Discussion started by: jyoung
2 Replies
5. UNIX for Dummies Questions & Answers
How do you remove trailing empty lines at the end of a text file? Thanks! (3 Replies)
Discussion started by: evelibertine
3 Replies
6. UNIX for Dummies Questions & Answers
Hello Friends, How can I remove the last two values of this line using sed
John Carey:507-699-5368:29 Albert way, Edmonton, AL 25638:9/3/90:45900
The result should look like this:
John Carey:507-699-5368:29 Albert way, Edmonton, AL 25638 (3 Replies)
Discussion started by: humkhn
3 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have a Linux file which has content as sh (0 Replies)
Discussion started by: bhuvanas
0 Replies
8. UNIX for Dummies Questions & Answers
HI i am having a file this
(sys19:pnlfct:/pfact/temp>) cat temp_sand
1234567890
1234567890
1234567890
1234567890
I want to make this file as
(sys19:pnlfct:/pfact/temp>) cat temp_sand
1456789023
1456789023
1456789023
1456789023
just take the 2nd and 3rd position and put it... (5 Replies)
Discussion started by: arunkumar_mca
5 Replies
9. Shell Programming and Scripting
Hi....
I have a situation...I have a data file...that has space(an extra row with no data) at the end of file. I am trying to remove that spaces only if the file has a space at the end of file and if there is no space I don't want to do anything.
Can you please help me in this regards.
... (4 Replies)
Discussion started by: rkumar28
4 Replies
10. Shell Programming and Scripting
I am writing a script to search PCL output and append more PCL data to the end accordingly.
I need to remove the last 88 bytes from the string.
I have searched for a few hours now and am coming up with nothing. I can't use head or tail because the PCL output is all on one line. awk crashes on... (3 Replies)
Discussion started by: craig2k
3 Replies