10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have many folders under which there is always a file with the same name, which contains the data I need to process later. A perl oneliner was borrowed
perl -e 'print "gene_id\t", join("\t", map {/(.*)\//; $1} @ARGV),"\n";' *_test.trim/level.csvto make a header so that each column... (5 Replies)
Discussion started by: yifangt
5 Replies
2. Shell Programming and Scripting
Hello,
I recently started going in depth with the shell, so I started learning from Linux Shell Scripting CookBook, 2nd edition. I am at the first chapter atm, and the author tells to define a function in the ~/.bashrc.
The function is below.
prepend() { && eval $1=\"$2':'\$$1\" && export... (1 Reply)
Discussion started by: Vaseer
1 Replies
3. Shell Programming and Scripting
Hi
i was going through the script debugging technique. below example was given in the book.
1 #!/bin/sh
2
3 Failed() {
4 if ; then
5 echo "Failed. Exiting." ; exit 1 ;
6 fi
7 echo "Done."
8 }
9
10 echo "Deleting old backups,... (11 Replies)
Discussion started by: scriptor
11 Replies
4. Shell Programming and Scripting
Hi all,
I'm not clear of this regexp command:
regexp {(\S+)\/+$} $String match GetString
From my observation and testing,
if $String is abc/def/gh
$GetString will be abc/def
I don't understand how the /gh in $String got eliminated.
Please help. Thanks (2 Replies)
Discussion started by: mar85
2 Replies
5. Shell Programming and Scripting
i am beginner in shell scripting.
not able to understand what below line will do.
PS1=${HOST:=Žuname -nŽ}"$ " ; export PS1 HOST
below is the script
#!/bin/hash
PS1=${HOST:=Žuname -nŽ}"$ " ; export PS1 HOST ;
echo $PS1
and i getting the below output
Žuname -nŽ$ (25 Replies)
Discussion started by: scriptor
25 Replies
6. UNIX for Dummies Questions & Answers
If I don't explain my issue well enough, I apologize ahead of time, extreme newbie here to scripting.
I'm currently learning scripting from books and have moved on to the text Wicked Cool Shell Scripts by Dave Taylor, but there are still basic concepts that I'm having trouble understanding.
... (10 Replies)
Discussion started by: Chasman78
10 Replies
7. Shell Programming and Scripting
Can Anybody please tell me the meaning of the script:
#!/bin/sh
str=$@
echo $str | sed 's/.*\\//'
exit 0 (6 Replies)
Discussion started by: nixhead
6 Replies
8. Shell Programming and Scripting
There is a function called start:
start()
{
echo -n $"Sending Startup Email: "
echo "${RESTARTBODY}" | mutt -s "${RESTARTSUBJECT}" ${EMAIL}
RETVAL=$?
if ; then
touch ${LOCKFILE}
success
else
failure
fi
echo
return ${RETVAL}
}
Can anyone explain what the bold part of the... (3 Replies)
Discussion started by: proactiveaditya
3 Replies
9. Shell Programming and Scripting
Hi,
Can anyone please let me know the meaning of this line,i am not able to understand the egrep part(egrep '^{1,2}).This will search for this combination in beginning but what does the values in {}signifies here.
/bin/echo $WhenToRun | egrep '^{1,2}:$' >/dev/null (1 Reply)
Discussion started by: namishtiwari
1 Replies
10. Filesystems, Disks and Memory
can anyone give me some idea on unix filesystem namei's algorithsm (2 Replies)
Discussion started by: kangc
2 Replies