Search Results

Search: Posts Made By: dcoolsam
31,314
Posted By dcoolsam
whoami just gives the name of the logged in user....
whoami just gives the name of the logged in user.
Whereas 'who am i' gives quite a lot of other parameters too.
Give it a try
8,612
Posted By dcoolsam
cp DESKTOP/Root of Photo Folders/Folder*/*jpg...
cp DESKTOP/Root of Photo Folders/Folder*/*jpg your_new_folder

OR
Execute this small script:

for file in DESKTOP/Root of Photo Folders/Folder*/*jpg;do
cp $file your_newfolder
done
4,078
Posted By dcoolsam
One more simple script, but without use of sed: ...
One more simple script, but without use of sed:

for line in File*.mp3;do
rm -f $line
done
7,144
Posted By dcoolsam
Check the following : echo...
Check the following :

echo "----------------- test_sys_job -----------------" | grep '\---------------'

\ is used for any special char.

Works fine on Suse.
66,437
Posted By dcoolsam
Good One Jim :b: If you dont want to make...
Good One Jim :b:

If you dont want to make use of any file, you can try using echo command:

e.g.
echo abc | awk -v val=$HOME '{print val}'

In your case:

echo abc | awk -v val=$value...
31,314
Posted By dcoolsam
You can make use the command 'ifconfig' If...
You can make use the command 'ifconfig'

If this does NOT work. You can type the command 'who am i'.

If you want to get exact string of IP, use following script:
who am i | awk '{print $5}' |...
14,863
Posted By dcoolsam
Hey Vinay, Your task is getting accomplished by...
Hey Vinay,
Your task is getting accomplished by just first 3 lines of my code.
Last line is just to print that value.
You can remove that last line : cat a

You check the incremented value in...
3,489
Posted By dcoolsam
You can make use of tr filter here: echo...
You can make use of tr filter here:

echo "a:c:d" | tr ":" ","

This will replace : with ,
8,539
Posted By dcoolsam
Even Simpler : echo...
Even Simpler :

echo "c_xxxx_cp_200908175035.zip" | cut -d "." -f 1 | cut -d "_" -f 1,2,3
14,863
Posted By dcoolsam
Vinay, Try this code: read i < a i=`expr...
Vinay,
Try this code:

read i < a
i=`expr $i + 1`
echo $i > a
cat a

It is working perfectly fine in bash.

Here "a" is a file name where the number is stored & "i" is a temp variable.
...
Showing results 1 to 10 of 10

 
All times are GMT -4. The time now is 04:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy