10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Dear forum members,
I want the script to count ALA as one (an example in quotes) and return an integer as 1 and not return 5 as an integer as it does now (look bash script). So how can I upgrade my script that it first checks or after finding all instances of ALA checks whether it is the same... (25 Replies)
Discussion started by: Aurimas
25 Replies
2. Shell Programming and Scripting
can anyone help identify where the issue is here?
awk 'BEGIN { c="perl -e 'print scalar(localtime("'${EPOCHTIME}'")), "\n"'"; c|getline; close( c ); print $2" "$3" "$4" "$6; }'
bash: syntax error near unexpected token `('
can't seem to figure it out. i tried this:
awk 'BEGIN {... (5 Replies)
Discussion started by: SkySmart
5 Replies
3. Shell Programming and Scripting
I am trying to get grep with awk command into variable.
But facing error.
Could someone pls help.
$ cat test_file
DEPLOYMENT="abc" # com
cluster="bcn"
$ grep DEPLOYMENT test_file | awk -F "\"" '{ print $2 }'
abc
$ a=`echo "grep DEPLOYMENT test_file | awk -F \"\\\"\" '{ print $2 }'"` ;... (6 Replies)
Discussion started by: Manasa Pradeep
6 Replies
4. Shell Programming and Scripting
Can Anyone help with looping...
awk 'FNR==1{i++}
{for(k=1; k<=NF; k++) A=$k} # 3 Dimension Array
END{
for(i=1;i<=217;i++) # For loop 2nd File 1st and 2nd column
x=0;y=0 ... (18 Replies)
Discussion started by: Akshay Hegde
18 Replies
5. UNIX for Dummies Questions & Answers
Hello,
And when you think you know the basics of something, UNIX in this case, something like what I will describe below comes along....
On a Linux system, a "typical" directory with some files. Say 20.
I do:
> ls | sort > mylisting
Now when I:
> vi mylisting
There is mylisting... (13 Replies)
Discussion started by: stavros
13 Replies
6. Shell Programming and Scripting
I hv a file --am executing a script which is giving me unexpected results
COntents of file:
f1
CMT_AP1_CONT:/opt/sybase/syboc125:150:ASE12_5::Y:UX:
CMT_AP1:/opt/sybase/syboc125:150:ASE12_5::Y:UX
f1.tmp
CMT_AP1_CONT:/opt/sybase/syboc125:150:ASE12_5::Y:UX:... (2 Replies)
Discussion started by: rajashekar.y
2 Replies
7. Shell Programming and Scripting
Hi all,
after hours of playing around with this and scouring the web I decided to ask my fellow UNIX operators as I can't wrap my head around this.
First off,
I want to parse an input file with tabs (I could pull this off easily with different delimiters) but I was trying to make nicer... (2 Replies)
Discussion started by: Keepcase
2 Replies
8. Shell Programming and Scripting
I am in the process of writing a script to change the grub password in the grub.conf file. I thought I had it figured out, but am running into an a problem I can't put my finger on.
Command I am running when I find that the grub.conf file contains "password --md5".
sed... (1 Reply)
Discussion started by: viRaven
1 Replies
9. HP-UX
I was wondering if it was possible to tell awk to print the output of a command in the print.
.... | awk '{print $0}'
I would like it to print the date right before $0, so something like (this doesn't work though)
.... | awk '{print date $0}' (4 Replies)
Discussion started by: IMTheNachoMan
4 Replies
10. Shell Programming and Scripting
Hi All,
I probably miss something fundamental here.
I want to rename a bunch of files in subdirectories (that might contain white spaces) with names that are related.
I thought following could do the job:
find . -name *.sh -exec mv {} $(echo {} | sed -e 's/0/1/g') \;
Now to be able to... (5 Replies)
Discussion started by: blued
5 Replies