10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am using awk here.
Inside an awk script, I have a variable which contains a very long XML data in string format (500kb).
I want to pass this data (as argument) to curl command using system function.
But getting Too many arguments error due to length of string data(payloadBlock).
I... (4 Replies)
Discussion started by: cool.aquarian
4 Replies
2. Shell Programming and Scripting
I am trying to identify all messages or prompts from a number of COBOL programs and they can usually be identified by a pair of double quotes on one line. However, sometimes the literal will not be finished on the first line but after a dash in column 7 of the next line, the literal will be... (6 Replies)
Discussion started by: wbport
6 Replies
3. Shell Programming and Scripting
I have a file like this:
cat file
name = server
jobname = 1010
snapshot_name = funky_Win2k12_20140213210409
I'm trying to use grep to isolate that first line (name = server), but
grep -f "name = " file
as well as
fgrep "name = " file
returns all 3 lines. How do I return... (1 Reply)
Discussion started by: ampsys
1 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
I am trying to to compare a string variable with a string literal inside a loop but keep getting the
./testifstructure.sh: line 6:
#!/bin/sh
BOOK_LIST="BOOK1 BOOK2"
for BOOK in ${BOOK_LIST}
do
if
then echo '1'
else
echo '2'
fi
done
Please use next... (1 Reply)
Discussion started by: daveu7
1 Replies
5. UNIX for Dummies Questions & Answers
Hi, i have a data file
cat f1.txt
$V01$S
this is 1
$v02$D
this is 2
$v03$F
this is 3
I have a variable $PARM which contains value say 'V01'
I have to print lines from f1.txt that start with '$'<${PARM}>'$'
How do i get matching lines from f1.txt that start with '$' then with ${PARM}... (1 Reply)
Discussion started by: ysrini
1 Replies
6. Shell Programming and Scripting
hi guys!!!
i wanna print literal value itself.
for example,
mycommand=$( ls -ltr )
"echo $mycommand" is not working... it runs the "ls" command.
also "echo $"mycommand" " is not working either. it print out "mycommand" literally...
how can i print out " ls -ltr " using variable "mycommand"? (4 Replies)
Discussion started by: curtis911
4 Replies
7. Shell Programming and Scripting
Hi,
i am using fgrep command with following syntax
fgrep -v -f pattern_file_name file
file contains few line and have the pattern which i am giving in pattern file.
My Problem is :
its is not giving any output.
while i am using fgrep -f pattern_file_name file
it is showing all... (4 Replies)
Discussion started by: emresearch
4 Replies
8. Shell Programming and Scripting
Hello,
i have a file "Movie.ini" looking e.g. like follows
* MOVIE A
bla bla
MOVIE B
blubb blubb
MOVIE C
I'd like to read the file "Movie.ini" with cat and grep and check whether it includes the string MOVIE only with a '*' at the beginnig.
By doing
"cat Movie.ini| grep MOVIE... (14 Replies)
Discussion started by: ABE2202
14 Replies
9. Shell Programming and Scripting
Hi,
I know that I can grep desired data to a file but is there a way to add an additional field of data to the output in addition to what is found. I want to add a login id to the data that is found in the grep. Is this even possible? Thanks for your help.
Toni (14 Replies)
Discussion started by: ski
14 Replies
10. Shell Programming and Scripting
How can i scan a file in a UNIX script and look for a particular keyword?
For example if i wanted to scan the file "lpcmp165.out" and see if it contains the term "error" or "ERROR" and then return a 0 or 1 or some indicator as such?
Detail example:
sqlplus -s xx/yyyyyyy#@zzz <<EOF >... (11 Replies)
Discussion started by: bobk544
11 Replies