10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello, there!
I am running an executable awk script with 'source.awk input_file' and found that when I need to print FILENAME, or ENVIRON or even FNR nothing happens ...
However, if I run it with 'awk -f source.awk input_file', then those variables are printed...
What is the reason for that... (1 Reply)
Discussion started by: fbird3
1 Replies
2. Shell Programming and Scripting
Hello, there!
I am running an executable awk script with 'source.awk input_file' and found that when I need to print FILENAME, or ENVIRON or even FNR nothing happens ...
However, if I run it with 'awk -f source.awk input_file', then those variables are printed...
What is the reason for that... (6 Replies)
Discussion started by: fbird3
6 Replies
3. Shell Programming and Scripting
i have a unique scenario id like help with.
im currently running this command and it does what i want:
printf '%s\n' "${RawContent}" | awk '/## Beginning Stages ##/,/## Ending Stages ##/' | awk '!/^#.*\!|^#\!|DefaultError/'
Can this be shortened? I'm looking for something portable as... (8 Replies)
Discussion started by: SkySmart
8 Replies
4. Shell Programming and Scripting
Heyas
Me try to print only the value of a (specific) variable assignment from a file.
What i get (1):
:) tui $ bin/tui-conf-get ~/.tui_rc TUI_THEME
dot-blue
""
"$TUI_DIR_INSTALL_ROOT/usr"
"$TUI_DIR_INSTALL_ROOT/etc/tui"
"$TUI_PREFIX/share/doc/tui"
"$TUI_PREFIX/share/tui"... (2 Replies)
Discussion started by: sea
2 Replies
5. Shell Programming and Scripting
HI,
MY question is a very simple one:
if i want to call an awk script with the input file name and also pass a variable value , then how to do it.
#>awk -f my_script.awk -v variable=value my_inputfile.txt
I can't do it like this.
throws error:
awk: my_script.awk:18:... (0 Replies)
Discussion started by: Onkar Banerjee
0 Replies
6. Shell Programming and Scripting
Hi All,
I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command.
The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Discussion started by: G.K.K
7 Replies
7. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
couldn't print out stored variable in awk
2. Relevant commands, code, scripts, algorithms:
i have in a... (5 Replies)
Discussion started by: ymc1g11
5 Replies
8. Shell Programming and Scripting
Hi everyone,
Ok here's the scenario.
I have a control file like this.
component1,file1,file2,file3,file4,file5
component2,file1,file2,file3,file4,file5I want to do a while loop here to read all files for each component.
file_count=2
while ]
do
file_name=`cat list.txt | grep... (2 Replies)
Discussion started by: The Gamemaster
2 Replies
9. Shell Programming and Scripting
All,
I am attempting to print the tenth ($COPY2) varaibales into one file.
But i am finding that all variables are being outputted except for $10.
Can someone help!!!!
Code Below
----------
echo $SERVER $IMAGE $IMAGEDAY $IMAGEMONTH $IMAGEYEAR $COPY1 $EXPIREDAY $EXPIREMONTH... (1 Reply)
Discussion started by: Junes
1 Replies
10. UNIX for Dummies Questions & Answers
Need some help.
I need to load data into some Oracle tables and one of the pieces of data that I need to load is the filename. This filename is distinct every single time. Basically the last 6 characters will be different with no pattern.
ex. testfile_041504_003567
To load the filename... (4 Replies)
Discussion started by: firkus
4 Replies