10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello folks,
I have multiple occurrences of the pattern:
).:
where is any digit, in various text context but the pattern is unique as this regex. And I need to turn this decimal fraction into an integer (corresponding percent value: the range of 0-100).
What I'm doing is:
cat... (1 Reply)
Discussion started by: roussine
1 Replies
2. Shell Programming and Scripting
Hello
can you please help me with below script which is meant to delete clients from multiple netbackup policies
I want to run a command insdie awk statement
apparelnlty this script is not working for me
for i in $( cat clients_list)
do
bppllist -byclient $i | awk... (6 Replies)
Discussion started by: Sara_84
6 Replies
3. Shell Programming and Scripting
Hello,
I have a set of files Xfile0001 - Xfile0021, and the content of this files (one at a time) needs to be printed between some line (lines start with word "Generated") that I am extracting from another file called file7.txt and all the output goes into output.txt. First I tried creating a for... (5 Replies)
Discussion started by: jaldo0805
5 Replies
4. Shell Programming and Scripting
Hi, i'm just after a simple explanation of how the following awk oneliner works.
gawk -F"," '{for(i=m;i<=n;i++)printf "%s" OFS,$i; print x}' m=1 n=70 OFS=, input.csv > output.csv
In particular i'm trying to understand how the two print statements work? How is the "x" variable being assigned... (3 Replies)
Discussion started by: theflamingmoe
3 Replies
5. Shell Programming and Scripting
Hello,
is there a way to use the awk print statement on two files at once? I would like to take two columns from one file, and one column from another file and print them as consecutive columns to a third file. Seems simple...as in:
file 1
1 a
2 b
3 c
4 d
5 e
file 2
1 t
2 u... (3 Replies)
Discussion started by: HugoHuhn
3 Replies
6. Shell Programming and Scripting
Hi Friends,
I have small issue with following code snippet.
I am trying call one function inside awk in which the function inturn will echo few lines. However when i ran script its throwing an error saying "nawk: syntax error at source line 1".
#!/bin/sh
eval input=$@
while read... (3 Replies)
Discussion started by: Shahul
3 Replies
7. Shell Programming and Scripting
hi all,
i have two files
1) a.txt
one
two
three
2)
abc "one" = 10
pqr "three" = 20
345 "two" = 0
this is what i want in third file (3 Replies)
Discussion started by: shishirkotkar
3 Replies
8. Shell Programming and Scripting
Hi all,
I have some code like this
awk -F, '{
if ($1==3)
print $2 > "output_file"
print "1" > "new_file"
}' "input_file"
When I check output_file this has the correct values in it. However the new_file has 1 in it for every line in the input_file. If the input file has 20 lins then... (2 Replies)
Discussion started by: Donkey25
2 Replies
9. Shell Programming and Scripting
mode=$1
psg telnetd | awk current=`date +%M`'{
printf ("mode is %s",mode)
printf ("mode is %s",ARGV)
}'
at command prompt when i run the script along with the argument i get only--
'mode is '
argument is not printed.(If the argument is... (3 Replies)
Discussion started by: Anteus
3 Replies
10. Shell Programming and Scripting
i'm trying to do this (in bash darwin);
echo "give me some words: "
read a
c=2 # this is get by other ways
echo $a | awk '{print $c}' # i want to print the column given
# by de $c variable
if there is someone understand what i pretend... (3 Replies)
Discussion started by: Tártaro
3 Replies