10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
Could you please help me how to search the string in a file, and when found; change the existing line to uppercase in command line?
I tried:
?whichcommand? -A "EXT" fileA | awk '{print tolower($0)}' | tee fileB
tr command simply converts entire file to uppercase but this is not what... (4 Replies)
Discussion started by: baris35
4 Replies
2. Shell Programming and Scripting
Hi,
I want to remove the spaces from all the lines matching a particular pattern from my file. For instance in file abc.txt I have following data.
Header,This is the header
111,this is 1st record
222, this is 2nd record
333, this is 3rd record
Footer,3 records found
Footer,111222333 ... (5 Replies)
Discussion started by: decci_7
5 Replies
3. Shell Programming and Scripting
HI
Can any one guide me how to achieve this task. I have 2 files
env.txt
#Configuration.Properties values
identity_server_url = http://identity.test-hit.com:9783/identity/service/user/register
randon_password_length = 6
attachment_file_path = /pass/temp/attachments/... (1 Reply)
Discussion started by: nikilbr86
1 Replies
4. Shell Programming and Scripting
Hi,
I want to achieve something similar to what described in another post:
The difference is I want to add the line if the pattern is not found.
File 1:
A123, valueA, valueB
B234, valueA, valueB
C345, valueA, valueB
D456, valueA, valueB
E567, valueA, valueB
F678, valueA, valueB
... (11 Replies)
Discussion started by: jyu3
11 Replies
5. Shell Programming and Scripting
Hi, i need help with my shell script
I have a file input.txt containing the following contents
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/wine
/usr/share/doc/wine/copyright
/usr/share/doc/wine/changelog.Debian.gz
I need output as
/usr/share/doc/wine
/usr/share/doc/wine/copyright... (3 Replies)
Discussion started by: Amit0991
3 Replies
6. Shell Programming and Scripting
I am passing a list of strings $list and want to remove all entries with --shift=number, --sort=number/number/..., --group=number/number/... Also are removed whether upper or lower case letters are used
For example the following will all be deleted from the list
--shift=12
--shift=2324... (7 Replies)
Discussion started by: kristinu
7 Replies
7. Shell Programming and Scripting
Hi,
I have a file with following format:
1|What is you name (full name)?|Character
2|How far is your school ?|Numeric
Now I need to remove everything inside brackets () or . There can be more than one pair of brackets. The output file should look like:
1|What is you name?|Character... (8 Replies)
Discussion started by: ppatra
8 Replies
8. Shell Programming and Scripting
So, I've been working on a project which takes layer 7 metadata from pcap dumps and archives it. However, there is a lot of dataless information that I don't want in my output. I know of ways to produce the output I want from the input file below, but I want a method of doing this, regardless of... (2 Replies)
Discussion started by: eh3civic
2 Replies
9. Shell Programming and Scripting
Hi All,
I am pretty new to pattern matching and extraction using shell scripting. Could anyone please help me in extracting the word matching a pattern from a line in bash.
Input Sample (can vary between any of the 3 samples below):
1) Adaptec SCSI RAID 5445
2) Adaptec SCSI 5445S RAID
3)... (8 Replies)
Discussion started by: jharish
8 Replies
10. Shell Programming and Scripting
Hi all,
I want to display line number for matching string in a file. can anyone please help me.
I used
grep -n "ABC" file
so it displays
6 ABC.
But i only want to have line number,i don't want that it should prefix matching context with line number.
Actually my original... (10 Replies)
Discussion started by: sarbjit
10 Replies