10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
Hi, so i have this command:
ps axo cmd=,user=,%cpu=,priority= --sort=-%cpu | awk '{print $2}'
And i want to print the second column, that is user. The thing is that i dont know why this is my output:
root
Eskizoi+
Eskizoi+
axo
{print
I dont know why axo and {print are there, the... (20 Replies)
Discussion started by: Eskizoide
20 Replies
3. Shell Programming and Scripting
Hi,
If i were to do this an print out the file, it will show as it is in the command
$ awk '/Privilege Use/ {P=0} /Object Access/ {P=1} P' AdvancedAudit.txt
Object Access
File System No Auditing
Registry No Auditing
Kernel... (1 Reply)
Discussion started by: alvinoo
1 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
I am having a file like this
##############################
j=1
while ]
do
temp_5=MODULE$j
awk '
$1 ~ /'${!temp_5}'/ {
do something }1' file1 > file2
((j = j +1 ))
done ###################
Setting the variables like this (8 Replies)
Discussion started by: kshitij
8 Replies
6. Shell Programming and Scripting
HI,
This is the code I am using:
awk -v aaa="connect" 'BEGIN {IGNORECASE} /aaa/,/!/ {print NR}' bb
This does not throw any error but it does not work. Pls help
Thanks. (4 Replies)
Discussion started by: sudvishw
4 Replies
7. 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
8. 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
9. Shell Programming and Scripting
Hi
How are you people ..
I am facing another problem regarding awk below is my code
-bash-3.00$ export a=10
-bash-3.00$ echo $a
10
-bash-3.00$ echo "" | nawk -v var=$a ' { if(var=10) { print "abc" } else { print "def"} } '
abc
-bash-3.00$ echo "" | nawk -v var=$a ' { if(var==10)... (2 Replies)
Discussion started by: aishsimplesweet
2 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I want to print 130 fileds using formatted printing in AWK. It looks like
awk '{printf ("%7.2f%7.2f...%7.2\n",$1,$2,...,$130)}' inflie>oufile
But it gives me an error:
Word too long!
Can you please help me with this? Is there another way to do this? (1 Reply)
Discussion started by: PHL
1 Replies