9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I currently have flat file with 32 columns. The field delimiter is cntl-A ( \x01). The file has been extracted from an oracle table using a datastage job. However, in the 6th field, the data contains additional control -A characters which came as a part of the table data.
I need... (12 Replies)
Discussion started by: harsha1238
12 Replies
2. Shell Programming and Scripting
Hi Gurus,
my current code like below:
nawk '{f1 = (NF>1)?$1:""}{print f1, $NF}'|sed -e 's/s(/,/g;s/)//g;s/ *,/,/'|nawk -F"," '{ab}END{for (i in b) if (!(i in a))print i}'
I have file like below. (this is autosys job dependencies)
the job with s() is dependencies, the job without s() is... (10 Replies)
Discussion started by: ken6503
10 Replies
3. Shell Programming and Scripting
awk -F"\t" -vOFS="\t" '{print $1"\t-\t-","",$6,$7"\t-"$8"\t-\t-\t"$15}' file.tsv > output.tsv
Using the above command how to remove the string www.abc.com from the $7 value. (7 Replies)
Discussion started by: sandy1028
7 Replies
4. Programming
I am new in Unix. I go through the man strip. But did not understand that, why when we have -G (debug and release ) option in the compiler, than using strip command to strip the debug information from the objects. i want to binary for teh production i will compile it without debug option. What the... (4 Replies)
Discussion started by: Saurabh78
4 Replies
5. Shell Programming and Scripting
Hey guys..
Can experts help me in achieving my purpose..
I have a file which contains email address of some 100 to 1000 domains, I need only the domain names..
Eg: abc@yahoo.com
hd@gamil.com
ed@hotmail.com
The output should contain only
Yahoo.com
... (5 Replies)
Discussion started by: achararun
5 Replies
6. UNIX for Dummies Questions & Answers
Hi,
Could anybody please guide how to strip all charaters after the last '/' from a string in a shell script.
I have got few strings like
"/tmp/oracle/oradata1/abc" or "/var/log/backup/bdfd" and I want to strip anything after the last "/" i.e "abc" and "bdfd" in my case.
Thanks,
Jamal (3 Replies)
Discussion started by: ahjaeasedqa
3 Replies
7. Shell Programming and Scripting
I have a file that looks like this:
/home/fred/opt/bin
/opt/usr/bin
/usr/sbin/var/opt
I need a way to chop of everything after the last occurance of the / sign including the /. So the file above will now look like this below.
/home/fred/opt
/opt/usr
/usr/sbin/var
I tried using... (6 Replies)
Discussion started by: x96riley3
6 Replies
8. Shell Programming and Scripting
Hi,
Can someone let me know how do I strip out any non-alphanumeric character in string tomake it alphanumeric?
i.e
abc def ghi ->abcdefghi
abc-def-ghi ->abcdefghi
abc#def-ghi->abcdefghi
Thanks in advance (3 Replies)
Discussion started by: braindrain
3 Replies
9. Shell Programming and Scripting
Guys,
Please can someone tell me how to strip each string from the following ?
TABLE1||METHOD||TYPE||STATUS||DATE
What i need is to assign each value to the variable
TABLE1 to var1
METHOD to var2
and so on
If there is NULL in one of them, something like A||B||||C||
I want the... (14 Replies)
Discussion started by: kamathg
14 Replies