10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi Fellows,
I was wondering how I can remove first few characters from multiple file names without do loop in unix?
e.g.
water123.xyz
water456.xyz
to
123.xyz
456.xyz
Thanks
Paul
Thanks. (3 Replies)
Discussion started by: Paul Moghadam
3 Replies
2. Shell Programming and Scripting
Hi All, I have two files
file1
123456CRTGHG
125437CRNDGF
126537CRDDGF
file2
123456CRTZHC
124567CJHGHG
125987CJHGDF
I need to compare the two files and any records in file 1 and 2 based on initial n characters (6 in example) need to be ignored.
string separated by unprintable... (2 Replies)
Discussion started by: Bruble
2 Replies
3. UNIX for Advanced & Expert Users
I have TXT files to process but they contain the degree symbols in them due to which the processing program fails on these files. I want a unix command that will remove the degree symbols from these files.
I tried using the sed command: sed 's///g' filename but it did not work. This issue... (14 Replies)
Discussion started by: khedu
14 Replies
4. UNIX for Dummies Questions & Answers
done some homework on this--
after i remove up to and including the ) i want to take newfile.txt and use that list to remove the files from a file in my the directory pwd
i have a input.txt file
cat input,txt
1)mary.jpg
12)john.jpg
100)frankkfkdf .jpg
i want to remove the characters in the... (1 Reply)
Discussion started by: plener
1 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have a directory that has a file which contained special characters in the filename. Can someone please advise how to remove the file, preferably with a rm -i ?
Thanks in advance.
Listing is as below:
{oracle}> ls -1b
bplog.bkup.001
bplog.bkup.002
bplog.bkup.003
bplog.bkup.004... (1 Reply)
Discussion started by: newbie_01
1 Replies
6. Shell Programming and Scripting
Hi ,
I have this type of files:-
BGH.28OCT2008.00000001.433155.001
BGH.28OCT2008.00000002.1552361.001
BGH.28OCT2008.00000003.1438355.001
BGH.28OCT2008.00000004.1562602.001
Inside them contains the below:
5Discounts
6P150 - Max Total Usage RM150|-221.00
P150 EPP - Talktime RM150... (5 Replies)
Discussion started by: olloong
5 Replies
7. Shell Programming and Scripting
sed 's/^..//' file1.txt > file2.txt
this will remove the first two characters of each line of a text file, what sed command will remove the last two characters? This is a similar post to my other....sry if I'm being lazy....
I need a file like this (same as last post)
>cat file1.txt
10081551... (1 Reply)
Discussion started by: ajp7701
1 Replies
8. UNIX for Dummies Questions & Answers
I have a couple of things I got stuck on
1)
I have a text file containing 25k search string that I need to search against compressed file. I have used this command but somehow it doesn't seems to use all the search terms.
I have put one search string per line in the txt file (I clean up... (2 Replies)
Discussion started by: m00
2 Replies
9. Shell Programming and Scripting
Hi folks,
- I have 800 txt files
- those files are cisco router configs
router1.txt
router2.txt
...
router800.txt
I want to accomplish the following:
- I want to have a seperate file with all the filenames that I want to process
- I want a script that goes trough all those... (7 Replies)
Discussion started by: I-1
7 Replies
10. Shell Programming and Scripting
i have a variable in a bash shell script called $hostname.
$hostname will always be different except it will always start with "-s " that is a - an s and a space. so echo $hostname
will look like this:
-s somehostname.com
how can i get rid of the leading -s ? ive tried tr -d but that gets... (2 Replies)
Discussion started by: norsk hedensk
2 Replies