Since for loop take evry space as an entry, my output breaksup at every space & shows like
awk
-F:"-"
'/abc/
{print $1}
...
..
however my required output is awk -F:"-" '/abc/ {print $1}
yes that would surely work... put it in while loop... to be presice.. if the file name is abc.txt.. it will look like..
cat abd.txt | while read line
do
echo $line
done
and in the loop you can do what ever you want with the line.... like cut etc !!....
So I'm stumped.
First... APOLOGIES... my work is offline in an office that has zero internet connectivity, as required by our client. If need be, I could print out my script attempts and retype them here. But on the off chance... here goes.
I have a text file (file_source) of terms, each line... (3 Replies)
hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file
<sequence>
<Filename>aldorzum.doc</Filename>
<DivisionCode>US</DivisionCode>
<ContentType>Template</ContentType>
<ProductCode>VIMZIM</ProductCode>
</sequence>... (4 Replies)
Using ksh on AIX what I am trying to do is to read the ls -l output from a file in a do while loop line by line. Extract the user name(3rd field) and the directory/file name(9th field) using awk and save them into variables. su -c to the user and change directory/file permisions to 777. Script I... (13 Replies)
Hi All
I have written the following script:
#!/bin/ksh
while read cmdline
do
echo `$cmdline`
pid="$cmdline"
done<commands.txt
===========
commands.txt contains:
ps -ef | grep abc | grep xyz |awk '{print $2};
My objective is to store the o/p of the command in a variable and do... (8 Replies)
Need to develop a unix shell script for the below requirement and I need your assistance:
1) search for file.log and file.bad file in a directory and read them
2) pull out "Load_Start_Time", "Data_File_Name", "Error_Type" from log file
4) concatinate each row from bad file as... (3 Replies)
I have to use shell script to run series of commands on another unix box by connecting through SSH and giving user credentials. For running commands on remote machine I have to use options reading from a local file.
Process:
Connecting to remote unix server <host1.ibm.com> through ssh
Login: ... (2 Replies)
I am trying to create a script that will read bash commands from a text file and execute them. These commands would all be defining variables. Is this possible, and if so, how do I do it. Any help would be greatly appreciated. (2 Replies)
I have a function that returns a bunch of exit codes, say func1, and in my code I'm trying to execute that function in an if statement. This is the closest I could get.
f1call=`func1 $arg1 $arg2`
if ]; then
...
fi
When I run the script the function never gets called. What's the right way... (7 Replies)
Hi
How can i dynamically read files names from a list file and execute them from a single shell script.
Please help its urgent
Thanks in Advance (4 Replies)