10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
My scenario is that I need to pick value from third column based on fourth column value, if fourth column value is 1 then first value of third column.Third column (2|3|4|6|1) values are cancatenated.
Please someone help me to resolve this issue.
Source
column1 column2 column3 column4... (2 Replies)
Discussion started by: Ganesh L
2 Replies
2. Shell Programming and Scripting
Hi all, Just want to say thanks for the great forum you have here, the old topics and posts have helped tremendously. So much so that I have managed to figure a lot out just by researching. However, I'm having a small issue that I simply can't find the answer to. (4 Replies)
Discussion started by: whyte_rhyno
4 Replies
3. Shell Programming and Scripting
Hi,
I need to cut the last of below link
lrwxrwxrwx 1 e027025 denccefs 36 Oct 21 02:30 prodcode1 -> /efare1/LINUXMTP-4/HOTFIX111019A_5U4/
after cut I need this value HOTFIX111019A_5U4
Please help me.
Thanks (3 Replies)
Discussion started by: rohit22hamirpur
3 Replies
4. Shell Programming and Scripting
Hi All,
file create2.txt contains
. /test.txt
./create.txt
./test2.txt
test.txt contains
inb-1|kuuhsdkjfhsd|djshfjksd|ndsbs896
inb-2|kuuhsdkjfhsd|djshfjksd|ndsbs896
inb-3|kuuhsdkjfhsd|djshfjksd|ndsbs896create.txt contains
abv-1|kjsdgfjksd|sdkjbfhokjsd|skjdbfhjkosd... (8 Replies)
Discussion started by: adaleru
8 Replies
5. Shell Programming and Scripting
Consider a string with white space "abc 123"
string="abc 123"
echo $string
abc 123
sed "s/$string/$string 456/" file
abc 123 456
cat file
abc 123
OK for now, but if you put this one in a shell script
it gives the result:
abc 456 123
somehow string end in first white space ??
... (3 Replies)
Discussion started by: xramm
3 Replies
6. Shell Programming and Scripting
Hi All,
I want to execute this
cat /etc/passwd | awk -F: '{print $1,$7}'
with a fixed column on the first and second. Say on the first I want 12 column and second with 20 column.
Example
root /usr/bin/ksh
lp /bin/false
Thanks for any comment you may add. (5 Replies)
Discussion started by: itik
5 Replies
7. Shell Programming and Scripting
I have a problem with my script. I am using following code
awk -F"," '{print $0,",",substr($2,3,3)}' $REG_InputFileName > $TargetSeqPath/Master.tmp
while read i
do
echo $i > $TargetSeqPath/Ref.tmp
OutFileName=`awk -F"," '{print $3}' $TargetSeqPath/Ref.tmp`
rm -f... (9 Replies)
Discussion started by: manmeet
9 Replies
8. Shell Programming and Scripting
file1.txt :
india pakistan bangladesh
japan canada africa
USA srilanka Nepal
file2.txt
Delhi
Tokyo
washington
I have to cut the first column of file1.txt and apend it with file2.txt as another column like this
Delhi india
Tokyo japan
washington USA
... (4 Replies)
Discussion started by: sakthifire
4 Replies
9. Shell Programming and Scripting
I have a file as below,
$vi myfile
aaa;20071217
bbb;20070404
ccc;20070254
"
if I want to cut the column 9-12 of the first line , the output should be 1217 , can advise how to write a script to get the result ? thx
p.s. can a script that have only ONE line could do that ? (5 Replies)
Discussion started by: ust
5 Replies
10. Shell Programming and Scripting
I have a text file which has the following data. There can be more lines in the file. But, I am only interested in these two lines which has ~ZZ~VISTN and ~ZZ~F159B segments.
ISA~00~ ~00~ ~ZZ~VISTN ~ZZ~U1CAD ~051227~183
7~U~00200~000011258~0~P~<
... (8 Replies)
Discussion started by: isingh786
8 Replies