Sponsored Content
Full Discussion: Taking inputs for awk
Top Forums Shell Programming and Scripting Taking inputs for awk Post 302908601 by SriniShoo on Wednesday 9th of July 2014 05:03:56 AM
Old 07-09-2014
can you provide the output of
Code:
grep "sid" file

---------- Post updated at 04:58 AM ---------- Previous update was at 04:58 AM ----------

Replace sid and file with respective names

---------- Post updated at 05:03 AM ---------- Previous update was at 04:58 AM ----------

If your SID is A12345 and file name is sample.txt, provide me the output of
Code:
 
grep "A12345" samlpe.txt

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash/AWK Newbie taking on more than he can chew.

A few questions: I'm trying to use Bash (although I'm not against using AWK) to try to accomplish a few things, but I'm stumped on a few points. I'm learning most of the basics quickly: but there are a few things I can't figure out. 1. I'm trying to count the number of .txt files in a... (3 Replies)
Discussion started by: Asylus
3 Replies

2. Shell Programming and Scripting

Perl script for taking inputs from one script and storing them into a document.

Hi. I wanted to create a Perl script which can take the outputs of a Perl script as it's input and temporarily store them in a document. Need help. Thanks.:) (8 Replies)
Discussion started by: xtatic
8 Replies

3. UNIX for Dummies Questions & Answers

taking the output of awk command to a new file

cat doc | nawk -v da="${date}" '$23>199 {print $0 > "doc"+da+".txt"}' Every time(need to run every day) i run this, i want to a create a new file "doc_01 Aug.txt". Basically, i want to create a new file with date appended in it. The above command is creating a file with name "0".... (4 Replies)
Discussion started by: vagar11
4 Replies

4. Shell Programming and Scripting

Give inputs externally to awk script

Hello to all, Please some awk expert could help me. If I want to run an awk script as "command" give it inputs externally I do: Script.sh Input="$1" # "$1" is the input that will be given to the script Output=${Input%.*}.csv awk '{$1=$1}1' $Input | awk '{...}' > $Output and I run the... (3 Replies)
Discussion started by: Ophiuchus
3 Replies

5. UNIX for Dummies Questions & Answers

awk solution for taking bins

Hi all, I'm looking for an awk solution for taking bins of data set. For example, if I have two columns of data that I wish to use for a scatter plot, and it contains 5 million lines, how can I take averages of every 100 points, 1000, 10000 etc... The idea is to take bins of the 5,000,000 points... (7 Replies)
Discussion started by: torchij
7 Replies

6. Shell Programming and Scripting

Taking inputs on prompt

need a help to get a script: bash # ./xx.sh >> count 567 script will run the xx.sh and it will go to >> then run "count" will get the result "567" and print it (7 Replies)
Discussion started by: Aditya.Gurgaon
7 Replies

7. Shell Programming and Scripting

Cannot get the correct ans. Using awk in taking average

Hi all, I think so I’m getting the result is wrong, while using following awk commend, colval=$(awk 'FNR>1 && NR==FNR{a=$4;next;} FNR>1 {a+=$4; print $2"\t"a/3}' filename_f.tsv filename_f2.tsv filename_f3.tsv) echo $colval >> Result.tsv it’s doing the condition 2 times, first result... (5 Replies)
Discussion started by: Shenbaga.d
5 Replies

8. Shell Programming and Scripting

awk command line arguments not taking

# more minusf.awk #!/bin/awk -f BEGIN { FS=":"; } { if ( $2 == "" ) { print $1 ": no password!"; } } # ./minusf.awk aa aa aa aa awk: can't open aa (6 Replies)
Discussion started by: sri.phani
6 Replies

9. Shell Programming and Scripting

Print Unknown Number of User Inputs in awk

Hello, I am new to awk and I am trying to figure out how to print an output based on user input. For example: ubuntu:~/scripts$ steps="step1, step2, step3" ubuntu:~/scripts$ echo $steps step1, step2, step3 I am playing around and I got this pattern that I want: ... (3 Replies)
Discussion started by: tattoostreet
3 Replies

10. Shell Programming and Scripting

Taking nth column and putting its value in n+1 column using awk

Hello Members, Need your expert opinion how to tackle below. I have an input file that looks like below: USS|AWCC|AFGAW|93|70 USSAA|Roshan TDCA|AFGTD|93|72,79 ALB|Vodafone|ALBVF|355|69 ALGEE|Wataniya (Nedjma)|DZAWT|213|50,550 I like output file in below format: ... (7 Replies)
Discussion started by: umarsatti
7 Replies
WMANAGER(1)						    BSD General Commands Manual 					       WMANAGER(1)

NAME
wmanager -- choose a window manager and launch it SYNOPSIS
wmanager [OPTIONS ...] DESCRIPTION
The wmanager program displays a choice of the window managers listed in the ~/.wmanagerrc file. When one is picked, the related command is written to standard output, intended to be used by shell scripts. If the program is exited without choosing a window manager, ``-1'' is written to standard output. -fg COLOR Set the foreground color. -bg COLOR Set the background color. -bg2 COLOR Set the widget background color -di[splay] host:n.n Set the X display. -dn[d], -nod[nd] Enable/disable drag & drop, probably does nothing. -g[eometry] WxH+X+Y Set the window size and location. -i[conic] Start as iconified. -k[bd], -nok[bd] Enable/disable keyboard support. -na[me] CLASSNAME Set the X window class. -s[cheme] SCHEME Unknown, probably does nothing useful. -ti[tle] WINDOWTITLE Set the window title. -to[oltips], -not[ooltips] Enable/disable tooltips, probably does nothing. EXAMPLE
To start using wmanager, create a ~/.wmanagerrc file - generally with wmanagerrc-update(1) - and add something like the following at the end of your ~/.xsession file: WM="$(wmanager -geometry +570+585)" ... exec $WM See also wmanager-loop(1) for a nicer way to start wmanager. SEE ALSO
wmanager(1), wmanager-loop(1), wmanagerrc-update(1), X(7x) HISTORY
The wmanager program was written by Meik Tessmer in 1999. This manual page was originally written in perldoc format by Tommi Virtanen in 2000, and converted to mdoc format by Peter Pentchev in 2008. AUTHORS
The wmanager program - Meik Tessmer <fuller@daemogorgon.net>. The manual page - Tommi Virtanen <tv@debian.org> and Peter Pentchev <roam@ringlet.net>. BSD
May 22, 2008 BSD
All times are GMT -4. The time now is 12:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy