9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi Experts,
Need your guidance for case statement. I tried many way but no success yet.Now my existing code is doing something like below. Each Line of the input file contains one test case.#!/bin/bash
FILE=$1
while read LINE; do
do COMMAND
done < $FILE
Now I want to modify the code... (6 Replies)
Discussion started by: pradyumnajpn10
6 Replies
2. Shell Programming and Scripting
Hi,
I am reading file records inside a while loop,
and want to update the record when certain condition is met.
How can I update a file while being read?
I want to avoid using temporary files, copy, rename, ...
while IFS=',' read -r f1 f2
do
function(f1,f2)
if
then
<add... (1 Reply)
Discussion started by: ysrini
1 Replies
3. Shell Programming and Scripting
Hi All,
I am having 7 jar files in a dir. abc like listed below
bash-3.00$ cd abc
bash-3.00$ ls
123.jar
23wdawd.jar
dfsa23.jar
dsa.jar
wew234.jar
adsd234234.jar
dfsda423.jarNow i want to assign all this jar files to a variable in the below format
... (6 Replies)
Discussion started by: natraj005
6 Replies
4. Shell Programming and Scripting
Hi,
I need to read a file name from a txt file, found the difference in two folders, then modify the file using vimdiff,
while read file
do
diff src/$file dest/$file > /dev/null 2>&1
if ; then
vimdiff src/$file dest/$file
fi
done < ./my_text_file
since the stdin has been... (6 Replies)
Discussion started by: laopi
6 Replies
5. Programming
Hi,
I have a string like this,
char str ="This, a sample string.\\nThis is the second line, \\n \\n, we will have one blank line";
if I want to use strtok() to seperate the string, which token should I use?
I tried "\n", "\\n", either not working.
peter (1 Reply)
Discussion started by: laopi
1 Replies
6. UNIX for Advanced & Expert Users
Hi all,
I would like to ask whether in Unix shell/perl have any functions or command to allow grep/cat/read a file inside compressed .tgz without extract it?
I know we can tar tvf a compressed tgz but this only allow we read the path/filename contained inside the tarball. If we want to read... (3 Replies)
Discussion started by: mayshy
3 Replies
7. UNIX for Dummies Questions & Answers
Hello sir,
I have created a jar file having some code in java.What it does is that it calls a shell code (a.sh) which is in the same directory.
Now my requirement is that I want to jar the a.sh also along with the other files and want to call the a.sh which is now inside the jar file and not... (1 Reply)
Discussion started by: nsharath
1 Replies
8. Shell Programming and Scripting
Hey Guys,
I need to search inside all the jar files of my directory for a specific string. Can anyone guide me as to how i can do it. I need this urgently please. More specifically i need to search for a class file name in the jar files.
Thanks in advance :-) (4 Replies)
Discussion started by: srikumar_cs
4 Replies
9. UNIX for Dummies Questions & Answers
Hi all,
In a while loop, like below...
while read line
do
read choice
case $choice in
1)
echo "xxx"
esac
done < file
why I can't run the read choice???? (3 Replies)
Discussion started by: dta4316
3 Replies