10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Searching through forum I found "sed 's/*$//'" can be used to remove trailing whitespaces and tabs from file. The command works fine but I see minor issue as below. Can you please suggest if I am doing something wrong here.
$ cat a.txt
upg_prod_test
upg_prod_new
$ cat a.txt |sed... (11 Replies)
Discussion started by: bhupinder08
11 Replies
2. Shell Programming and Scripting
Hello.
I have a config file (/etc/my_config_file) which may content :
#
# port for HTTP (descriptions, SOAP, media transfer) traffic
port=8200
# network interfaces to serve, comma delimited
network_interface=eth0
# set this to the directory you want scanned.
# * if have multiple... (6 Replies)
Discussion started by: jcdole
6 Replies
3. UNIX for Dummies Questions & Answers
How can I specify special meaning characters like ^ or $ inside a regex range. e.g
Suppose I want to search for a string that either starts with '|' character or begins with start-of-line character.
I tried the following but it does not work:
sed 's/\(\)/<do something here>/g' file1
... (3 Replies)
Discussion started by: jawsnnn
3 Replies
4. Shell Programming and Scripting
first of all I thought the argument DONE is necessary for all scripts that have or begin with do statements which I have on my script, However, I still don't completely understand why I am receiving an error I tried adding another done argument statement but didn't do any good.
I appreciate... (3 Replies)
Discussion started by: wolf@=NK
3 Replies
5. 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
6. Shell Programming and Scripting
Hi
I have a file which contains wrong XML, There are some garbage characters at the end of line that I want to get rid of. Example:
<request type="product" ><attributes><pair><name>q</name><value><!]></value></pair><pair><name>start</name><value>1</value></pair></attributes></request>�J ... (7 Replies)
Discussion started by: dirtyd0ggy
7 Replies
7. Shell Programming and Scripting
All:
Can somebody help me out with a sed command, which removes the the first occurance of ')' until the end of the line
If I have the following input
... (5 Replies)
Discussion started by: BeefStu
5 Replies
8. 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
9. Shell Programming and Scripting
I have a file with varying record length in it. I need to reformat this file so that each line will have a length of 100 characters (99 characters + the line feed).
AU * A01 EXPENSE 6990370000 CWF SUBC TRAVEL & MISC
MY * A02 RESALE 6990788000 Y... (3 Replies)
Discussion started by: udelalv
3 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