10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I'm trying to get a line returned as is from the below input.csv file in Bash in Linux, and somehow I get an unexpected newline in the middle of my input.
Here's a sample line in input.csv
$> more input.csv
TEST_SYSTEM,DUMMY@GMAIL.COM|JULIA H|BROWN
And here's a very basic while loop... (7 Replies)
Discussion started by: ChicagoBlues
7 Replies
2. Shell Programming and Scripting
Hi
I'd like to add the newline:
\tuser: nobody", or "<TAB>user: nobody
to all files named:
docker-compose.ymlin subfolders of pwd with names beginning with 10-20.
Within these files, I'd like to find the line (there'll only be one) containing:
command: celery workerNOTE: As far as... (2 Replies)
Discussion started by: duncanbetts
2 Replies
3. Shell Programming and Scripting
Given a csv file with 40 columns with name, address, hometown etc.
I use a bash command in 1 line which:
1. gets the address column and pipes that to
2. grep the first digit and everything that follows
Command:
awk -F ";" '{print $19}' /Users/jb/Desktop/ReorderTempTotal.csv | grep -o "\d.*"... (7 Replies)
Discussion started by: JBVeenstra
7 Replies
4. Shell Programming and Scripting
Hi guys,
I got a requirement that
... (5 Replies)
Discussion started by: mohanalakshmi
5 Replies
5. Shell Programming and Scripting
Hi,
I am getting crazy after days on looking at it:
Bash in Ubuntu 12.04.1
I want to do this:
pattern="system /path1/file1 file1"
new_pattern=" data /path2/file2 file2"
file to edit: data.db
- I need to search in the file data.db for the nth occurrence of pattern
- pattern must... (14 Replies)
Discussion started by: Phil3759
14 Replies
6. Shell Programming and Scripting
I am trying to search the pattern "ARS (11)" and after the LAST pattern, i am trying to open new line and enter text using sed.
My Existing Text file is Users.txtpaul, Paul Smith, Stevn Smiley, REQ000001, ARS (11)
sam, Sam Martin, Stevn Smiley, REQ000001, ARS (11)
mike, Mike Conway, Stevn... (8 Replies)
Discussion started by: evrurs
8 Replies
7. Shell Programming and Scripting
Hi,
I use sed to insert text at beginning of a file. But sed inserts a newline after my text that I do not need. For example, I want to insert "foo" at the beginning of my file:
> cat myfile
This is first line.
> sed -i '1i\foo' myfile
> cat myfile
foo
This is first line.
... (5 Replies)
Discussion started by: tdw
5 Replies
8. Shell Programming and Scripting
Hi ,
I am having an issue with the Awk script to insert newline for a regular expression match
Having a file like this
FILE1
####################
RXOER , RXERA , RXERC , RXERD
.RXEA(RXBSN), RXERD , REXCD
input RXEGT
buffer RXETRY
#######################
Want to match the RXE... (38 Replies)
Discussion started by: jaita
38 Replies
9. Shell Programming and Scripting
Hi,
I need to insert two newline characters after matching of a pattern in each line of a file.
Eg. If i have a file with contents as follows:-
Now, i want output as follows :-
i.e., I need to insert two newline characters after the occurance of pattern "</Message>>".
Thnx... (1 Reply)
Discussion started by: DTechBuddy
1 Replies
10. UNIX for Dummies Questions & Answers
Good Day,
Im new to scripting especially awk and sed. I just would like to ask help from you guys about a sed command that prints the line immediately after a regexp, but not the line containing the regexp.
sed -n '/regexp/{n;p;}' filename
What if my regexp is 3 word or a sentence. Im... (3 Replies)
Discussion started by: ownins
3 Replies