9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I am new in bash scripting. In my work, I provide support to several users and when I connect to their computers I use the same admin and password, so I am trying to create a script that will only ask me for the IP address and then connect to the computer without having me to type the user... (5 Replies)
Discussion started by: arcoa05
5 Replies
2. Shell Programming and Scripting
If i'm given a string like "abc-def-1.2.3", how would I return "1"? I'm new to scripting and got stumped on this problem. Thanks in advance! (7 Replies)
Discussion started by: atsim
7 Replies
3. Shell Programming and Scripting
Hy friends, I am newbie to bash scripting, can anyone explain how b=${a/23/BB} # Substitute "BB" for "23". this line converts "b" into string and and "d" into Integer. Thanks in advance (4 Replies)
Discussion started by: Qazi
4 Replies
4. Shell Programming and Scripting
I have an output file .dat. From this file i have to do a distinct of the ID using the sort uniq command in bash script. How can i do it? i found :
sort -u ${FILEOUT_DAT}
but i don't think is my solution because the id isn't specified.. is there other solution? (7 Replies)
Discussion started by: punticci
7 Replies
5. Shell Programming and Scripting
In my script I'm retrieving a parameter through an API call. I need to trim some things out of the result so I can use it as a parameter to pass to another process. I've got it working but it's pretty kludgy and I'm hoping someone can help me with a better way.
This is the code that retrieves... (2 Replies)
Discussion started by: withanh
2 Replies
6. Shell Programming and Scripting
Hello guys,
here is my problem:
I got a shell script which is called by an external piece of software, the external software is not under my control. The software passes data as an argument to my script like
./bla.sh 'service;1234567890;ok;hostname;some text here'
I need to pass the... (3 Replies)
Discussion started by: snoogie
3 Replies
7. Shell Programming and Scripting
my question is , i want to get the distinct email address from the file which contains:
<Email address>|<file name>
/tmp/test.log
petercs@yahoo.com|sf1.pdf
sandycs@yahoo.com|sf2.pdf
davidcs@yahoo.com|sf3.pdf
davidcs@yahoo.com|sf4.pdf
i want to get the result like:
petercs@yahoo.com... (5 Replies)
Discussion started by: bearonweb
5 Replies
8. Shell Programming and Scripting
I have a program to create a directory if not present. Here is the program.
FYI: Directory name format: YYYY_MM_DD
#!/bin/bash
date=`date +%Y_%m_%d`
presence=$(ls -lrt /TS_File/ | grep "$date" | awk '{print $9}')
if
then
mkdir /TS_File/$date
else
echo "Unable to Create... (5 Replies)
Discussion started by: nthiruvenkatam
5 Replies
9. Shell Programming and Scripting
Bash shell. I'm trying to filter a string taken from user input. I can replace one word at a time. This method supports regex, so is it possible to replace various words at a time?
STRING="Hello World! word1 word2";
FILTERED=${STRING/word1|word2/}; # Not working: replace 2 or more words ???
... (10 Replies)
Discussion started by: limmer
10 Replies