10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Guys, I have a variable in a script that I want to transform to into something else Im hoping you guys can help. It doesn't have to use sed/awk but I figured these would be the simplest.
DATE=20160120
I'd like to transform $DATE into "01-20-16" and move it into a new variable called... (8 Replies)
Discussion started by: dendenyc
8 Replies
2. Shell Programming and Scripting
Hello,
Beginning with shell scipting, I'm trying to find in a csv file, the lines where the field related to hostname is displayed as an FQDN intead the hostname. (some lines are correct) and the to correct that inside the file:
Novell,11.0,UNIX Server,bscpsiws02,TxffnX1tX1HiDoyBerrzWA==... (2 Replies)
Discussion started by: Wonto
2 Replies
3. Shell Programming and Scripting
Hi All, Need Suggestion, Want to sort a file using awk & sed to get required, output as below, such that each LUN shows correct WWPN and FA port Numbers correctly:
Required output:
01FB 10000000c97843a2 8C 0
01FB 10000000c96fb279 9C 0
22AF 10000000c97843a2 8C 0
22AF 10000000c975adbd ... (10 Replies)
Discussion started by: aix_admin_007
10 Replies
4. Shell Programming and Scripting
Ok, so I have a bash script with an embedded expect statement.
Inside of the expect statement, i'm trying to pull all of the non-comment lines from the /etc/oratab file one at a time.
Here's my command:
cat /etc/oratab |sed /^s*#/d\ | awk 'NR==1'|awk -F: '{print \"$1\"}'|. oraenv
Now,... (0 Replies)
Discussion started by: alexdglover
0 Replies
5. UNIX for Dummies Questions & Answers
Is there an awk, sed, vi or any line command that adds Field Separators (default spaces) to each line in a file?
$cat RegionalData
12FC2525MZLP8266900216
12FC2525MZLP8266900216
12FC2525NBLP8276900216
12FC2525NBLP8276900216
Desired results:
1 2 F C 2525 MZ LP 826 690 02 16
1 2 F C... (2 Replies)
Discussion started by: MS75001
2 Replies
6. Shell Programming and Scripting
Hello
How do i check that correct input files are used while using AWk and SED for file manipulation?
e.g
awk '/bin/ {print $0 }' shell.txt
sed 's/hp/samsung/' printers.txt
how do i ensure that the correct input files I am working with are used? (5 Replies)
Discussion started by: Pauline mugisha
5 Replies
7. Shell Programming and Scripting
Hello ,
I have huge file with below content. I need to read the numeric values with in the paranthesis after = sign. Please help me with awk and sed script for it.
11.10.2009 04:02:47 Customer login not found: identifier=(0748502889) prefix=(TEL) serviceCode=().
11.10.2009 04:03:12... (13 Replies)
Discussion started by: rmv
13 Replies
8. Shell Programming and Scripting
Hi,
I have tried many times to add the string into the first line of the file or the middle of the file but could not find the solution.
I first tried by
$echo "paki" >> file
This code only append paki string at the end of file "file" but how can i add this "paki" into the first line or... (5 Replies)
Discussion started by: ali hussain
5 Replies
9. Shell Programming and Scripting
I need to get a section of a file based on 2 params. I want the part of the file between param 1 & 2. I have tried a bunch of ways and just can't seem to get it right. Can someone please help me out.....its much appreciated. Here is what I have found that looks like what I want....but doesn't... (12 Replies)
Discussion started by: Andy Cook
12 Replies
10. Shell Programming and Scripting
Hi,
I have a file name, for which I want to strip out the first bit and leave the rest...
So I want to take the file name .lockfile-filename.10001 ,strip it and have only filename.10001 ...
Thanking you all inadvance,
Zak (6 Replies)
Discussion started by: Zak
6 Replies