10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
i have a snippet from server log delimited by forward slash.
/a/b/c/d/filename
i need to cut until last delimiter. So desired output should look like:
/a/b/c/d
can you please help?
Thanks in advance. (7 Replies)
Discussion started by: alpha_1
7 Replies
2. Shell Programming and Scripting
Hi,
Variable=MKT1,MKT2,MKT3 and so on
i am trying to seperate MKT1,MKT2,MKT3 and store each in a variable.
the values in variable1 may vary. I am using bash (8 Replies)
Discussion started by: arghadeep adity
8 Replies
3. Shell Programming and Scripting
Hi,
for fd in $(grep "/tmp/" hello.properties)The grep gives me the below output:
deploydir=/tmp/app1/dfol
prodir= /tmp/hello/prop
......
Now i want to store /tmp/app1/dfol then /tmp/hello/prop in a variable so that i can check if those folders files exists or not.
The delimiter would... (4 Replies)
Discussion started by: mohtashims
4 Replies
4. UNIX for Dummies Questions & Answers
Hi !
With awk, I would need to trim a string from the beginning up to the first occurrence of "1", then from the beginning up to the second occurrence of "1", then from the beginning up to the third, then the fourth...., then the last occurrence of "1".
input:
1aaa1bb1ccccccc
dd1e1ffff... (7 Replies)
Discussion started by: beca123456
7 Replies
5. Shell Programming and Scripting
Hi I need to trim white spaces from strings in a file.
Input file is like this:
1_rrc_CatalogGroups.csv = 607
1_rrc_Sales_TopCatalogGroups.csv = 4
1_rrc_Sales_CatalogEntries_CatalogGroup_Rel.csv = 7
Need to trim space before and after = symbol.
This is my script:
#!/usr/bin/ksh
... (2 Replies)
Discussion started by: sukhdip
2 Replies
6. Shell Programming and Scripting
Hi,
My inputfile contains field separaer is ^.
12^inms^
13^fakdks^ssk^s3
23^avsd^
13^fakdks^ssk^a4
I wanted to print only 2 delimiter occurence i.e
12^inms^
23^avsd^ (4 Replies)
Discussion started by: Jairaj
4 Replies
7. Shell Programming and Scripting
My file looks something like this
Wnat I need is to look for the Reference sequence (">Reference1") and based on the length of that sequence trim all the entries in that file. So, the rersulting file will contain all sequences with the same length, like this
Thus, all sequences will keep... (5 Replies)
Discussion started by: Xterra
5 Replies
8. Shell Programming and Scripting
My files look like this
And I need to cut the sequences at the last "A" found in the following 'pattern' -highlighted for easier identification, the pattern is the actual file is not highlighted.
The expected result should look like this
Thus, all the sequences would end with AGCCCTA... (2 Replies)
Discussion started by: Xterra
2 Replies
9. Shell Programming and Scripting
Hi,
I have a string like ABC.123.XYZ-A1-B2-P1-C4. I want to delimit the string based on "-" and then get result as only two strings. One with string till last hyphen and other with value after last hyphen... For this case, it would be something like first string as "ABC.123.XYZ-A1-B2-P1" and... (6 Replies)
Discussion started by: gupt_ash
6 Replies
10. Shell Programming and Scripting
Hi,
I am trying to find a script command that will let me trim leading and trailing space from a string. I have coded a SQL Select and sending the output to a file. Later I am parsing the file and reading each field. The problem is that each field uses the same size as the DB2 type it was defined... (2 Replies)
Discussion started by: fastgoon
2 Replies